Adding click() to <object> in IEs

Adding click() to <object> in IEs

This doesn't seem to work in IEs (6,7,8). Seems to be no problem in FF, Safari, Chrome.

Is there a workaround or is that not supposed to work?

What I am trying to do is to track clicks on flash content.

See example code in the following. Any help is much appreciated!

  1. <script type="text/javascript">
  2. $(function() {
  3. $(".skyscraperlink").each(function(i) {}).click(function() {
  4. var id = $(this).attr("id");
  5. var banner = $(this).attr("rel");
  6. $.ajax({
  7. type: "POST",
  8. url: "/modernisierung/wLayout/structure/scripts/ajax_click_logger.php",
  9. data: "id_type=1&id_partner="+id+"&id_banner="+banner
  10. });
  11. });
  12. });
  13. </script>

  14. <object class="skyscraperlink" id="'.$partner[0]['id'].'" rel="'.$product["id"].'" width="'.$bannerwidth.'" height="'.$bannerheight.'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab #version=4,0,0,0">
  15. <param name="movie" value="'.$bannerpath.'">
  16. <param name="quality" value="high">
  17. <embed class="skyscraperlink" id="'.$partner[0]['id'].'" rel="'.$product["id"].'" src="'.$bannerpath.'" width="'.$bannerwidth.'" height="'.$bannerheight.'" quality="high" salign="T" type="application/x-shockwave-flash" pluginpage="http://www.macromedia.com/shockwave/download/index.cgi ?P1_Prod_Version=ShockwaveFlash"></embed>
  18.   </object>