i have a problem.
I have created a js file (question.js) (containing a method called as startTimer), which calls jquery.timer.js function for the timer and display timer on the screen.
On clicking of answer button I am calling managed bean method for validating user answer
and if answer is correct I am changing the question on the screen.
My Queries :
1) How can I include the two js files (question.js and jquery.timer.js)
2) How can I call the js function (startTimer) when my form loads, or when question changes on screen.
I am using facelet and I need to do above in myquiz.xhtml which contains ui:composition tag.
jQuery has a standard and well-documented way of calling functions when a page has loaded. You can use this to start your timer.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.