Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

simulate clicking on a link after 10 seconds

Posted on 2006-11-26
3
Medium Priority
?
873 Views
Last Modified: 2010-05-18
Hi,

Is there a way to simulate clicking on a link after 10 seconds in javascript?
0
Comment
Question by:zattz
3 Comments
 
LVL 25

Accepted Solution

by:
devic earned 2000 total points
ID: 18014799
<a id=myLink href="http://www.google.com">wait 10 sec</a>
<script>
setTimeout("document.getElementById('myLink').click()", 10000);
</script>
0
 

Author Comment

by:zattz
ID: 18015019
thanks
0
 
LVL 1

Expert Comment

by:mrwhipple
ID: 21445573
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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question