Reputation: 79
I have a time on user control, and button on the web page. On perticular time I want to fire button click event. Please tell me how do this.
Upvotes: 1
Views: 1233
Reputation: 3241
If you want the button clicked code to run after five seconds, for example, you would do the following.
setTimeout("document.getElementById(\"buttonId\").click();", 5000)
This link has basic information about timing in JavaScript.
It would be helpful if you could tell us more about the particular time-related user control you are using.
Upvotes: 0
Reputation: 8117
.click
javascript method will help you.
document.getElementById("buttonId").click();
Upvotes: 2