html - Cross Browser Automatically Click Link On Page Load with Javascript -


i have simple html page iframe image link. after page loads want link clicked automatically. need link clicked instead of doing meta refresh thats out of question. searched around , seems firefox not support methods so...there has cross browser solution. here have far wont work...why?

 <script type="text/javascript"> window.onload=functionname; $(document).ready(function(){   $('#clicked').trigger('click') }); </script>  <div id="clicked">       <iframe src="http://mysource.com" width="40" height="10" scrolling="no" border="0" marginwidth="0" style="border:none;" frameborder="0"></iframe>   </div> 

add # before id value

$('clicked').trigger('click'); 

to

$('#clicked').trigger('click') 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -