I have a trivia php application. The users logon to the app, and then they see a question with a radio button answers.
Each time the user submit an answer, the same page reloads with the next question.
I want to add a timer in order to show the user the time that passed since they logon to the app.
I was thinking about doing it with JavaScript but my problem is that each time the page reloads, the timer restarts to 00:00.
Can I do it with an iFrame? If so, how? If not, I’ll be happy to hear about other ways.
Thank you!
You really shouldn’t be using iframes these days.
Take a look at using AJAX : AJAX tutorial.
You might also want to check out jQuery which will make things easier.
The basic idea is that you can make requests from your webpage, then get and process the response without refreshing the page.