1

How to get clickTAG url and click on that url using jquery

here the sample code

<object type="application/x-shockwave-flash" flashvars="clickTAG=http://testing.com"></object>

Regards Dev

2 Answers2

1

try this code, you will get url in variable now you can apply action on url eg. click or window.location..

$(function() {
  $("object[flashvars^=clickTAG]").on('click', function(Event) {
    var url = $(this).attr('flashvars').split('=')[1];
    alert(url);
  })
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<object type="application/x-shockwave-flash" flashvars="clickTAG=http://testing.com">Object Test</object>
Girish
  • 11,907
  • 3
  • 34
  • 51
0
var v = $("object").attr('flashvars');
var url = v.split('=')[1];
window.location.href = url;

This could get you to the url of the object!

DEMO

M Reza Saberi
  • 7,134
  • 9
  • 47
  • 76