Phil
That worked great, Thanks alot.
Would you help me with one more thing. The
js code to Reset also uses a button and I would also like to change that to an image. I have tried the code you provided for the Restart button but must be coding it wrong. Would you be so kind a to type this out for me?
Here is the code as it sits now:
questionHTML = questionHTML + "P"<INPUT=button " +
"VALUE='Reset Stats' " +
"onClick=\"window.top.fraTopFrame_ccna1.fraGlobalF unctions_ccna1.setCookie" +
"('previousNoAsked', 0, '','1 Jan 1970')\" " +
"NAME=buttonReset>"
Could you make this work so I could use an image instead of the old gray button?
I would really appreciate it!
Larry
Quote:
quote:Originally posted by pgtips
You are using the wrong type of HTML control. An input control of type image acts like a submit button, it is not a replacement for a regular button.
Put the image inside an anchor, and add the js code to the onclick of the anchor, like this:
Code:
questionHTML += "<P><a href='#' " +
"onclick=\"window.location.replace('QuizPage1.htm')\">" +
"<img src='start_again.gif' alt='Restart Quiz'></a>";
hth
Phil
|