javascript - jQuery click event not redirecting to href -


i've got html page embedded flash movie, has button. button in flash invokes lnkemail's click event. it's supposed stop navigating new page, event.preventdefault(); , returning of false event handler don't seem working me. can provide insight?

the below example working in chrome, fails in ie 7 , ff. in browsers redirects blank page object [object] body , in ff has url set javascript code execute within flash movie. (ie: "javascript:jquery('#lnkemail').click();")

below code in flash actionscript.

cmddemo.addeventlistener(mouseevent.click, clickhandler); function clickhandler(event:mouseevent):void {    navigatetourl(       new urlrequest(          "javascript:jquery('#lnkemail').click();"       ),        "_self"    ); } 

in containing html page there following scripts , elements:

<script type="text/javascript">    $(function(){       $.nyromodalsettings({          debug: true       });        $('#lnkemail').click(function(event) {          event.preventdefault();          $.nyromodalmanual({             url: 'demorequest.aspx?type=4'          });          return false;       });    }); </script> 

and later in same file:

<div id="box_stage_home">    <script type="text/javascript">       $(document).ready(function() {           $('#homeanimation').flash({              swf: 'flash/index_page.swf',              height: 288,              width: 686,              wmode: 'transparent'           });        });    </script>    <div id="homeanimation"><!--ie 6.0--></div>    <a href="emailsend.aspx?type=4" id="lnkemail">&nbsp;</a> </div> 

take @ navigatetourl documentation: http://livedocs.adobe.com/flash/9.0/actionscriptlangrefv3/flash/net/package.html#navigatetourl%28%29. not intendend used javascript: links.

to want, use externalinterface.call().


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -