Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a website project.it is an online Quiz,it has a timer in javascript,i want when the timer has time out,a button that regist answers in database be clicked automatically and regist my answers in data base,is any body to solve my problem?
Posted

1 solution

What you ask is to simulate a button click using Javascript.

So, you need to do something like below when the timer has timed out:
JavaScript
document.getElementById('btnSubmit').click();

This will trigger server side button click event for btnSubmit - write your database related code here.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900