simulate clicking on a link after 10 seconds

Hi,

Is there a way to simulate clicking on a link after 10 seconds in javascript?
zattzAsked:
Who is Participating?
 
devicConnect With a Mentor Commented:
<a id=myLink href="http://www.google.com">wait 10 sec</a>
<script>
setTimeout("document.getElementById('myLink').click()", 10000);
</script>
0
 
zattzAuthor Commented:
thanks
0
 
mrwhippleCommented:
This solution works great in Internet Explorer but in Firefox it throws the following JavaScript error
document.getElementById("myLink").click is not a function

Do you know a method that will work in both browsers?

Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.