pauldboughter Posted February 16, 2010 Share Posted February 16, 2010 How would I call the showQuiz() function to display the questions in online exam. This showQuiz() I have in a .js filefunction showQuiz() { document.getElementById("quiztable").style.visibility="visible";}Here is the startClock() function that I am using. The document.write showQuiz() function is what I need the help on since I don't think that's ever right.function startClock() { document.write showQuiz(); var clockId = setInterval ("runClock()", 1000); }Here is part of the quiz form incase it helps!!!!<form id="quiz" name="quiz" action=""><div id="header"> <p><img src="oae.jpg" alt="Online Aptitude Exam" /> <span>Grunwald Testing, Inc.</span><br /> 1101 Science Drive<br /> Oakdale, CA 88191 </p></div><div id="intro"> <p>This is a timed quiz of intelligence and perception. Your final score will be based on the number of correct answers and the time required to submit those answers.</p> <p>To start the quiz, click the <b>Start Quiz</b> button below, which will reveal the first page of quiz questions and start the timer. When you have completed the questions, click the <b>Submit Answers</b> button on the quiz form.</p> <p id="buttons"> <input type="button" value="Start Quiz" onclick = "startClock()" /> <br /> <input name="quizclock" id="quizclock" value="0" /> </p></div><div id="questions"> <h1>Page 1: Pattern Recognition</h1> <table id="quiztable"> Link to comment Share on other sites More sharing options...
jeffman Posted February 16, 2010 Share Posted February 16, 2010 document.write() is only useful while the page is loading (or if it is writing to a know frame or window). Anyway, you don't use it to call a function. Try removing it and just call showQuiz() . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.