Onclick redirect

T

Teach

I am creating a fairly easy online quiz for learners of English as a
second language. The quiz works just fine but I want to tweak it a
bit, and I am not sure how to go about it. It is a simple quiz where
the user sees a picture and then has to click on a radio button for
his/her response. If their answer is wrong, they get a negative
feedback . If their answer is correct, they get a positive response.

All works fine. However when the the correct response is clicked,
rather than get a positive response, I would like them to be
redirected to another page for another question. Below is the part of
the code that dealing with the radio button input. In this case, the
3rd response is correct. How can I modify it to direct them to
.../question2.html?

Thanks in advance.


<TD width=50%>
<INPUT TYPE=radio NAME=one VALUE="Ooops! Try again."
onclick="choice1(this.form)">hurry on<br>
<INPUT TYPE=radio NAME=one VALUE="No! Try again."
onclick="choice1(this.form)">hurry down<br>
<INPUT TYPE=radio NAME=one VALUE="Right!"
onclick="choice1(this.form)">hurry up<br>
<INPUT TYPE=radio NAME=one VALUE="Wrong! Try again."
onclick="choice1(this.form)">hurry off<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE=text NAME=feedback1 VALUE="" SIZE=30><br>
</P>
<TD width=50%>
<P align="center"><img border="0" src="exc2/hurry%20up.gif"
width="125" height="117"></P>
</TD>
 
J

Jim Buyens

Change the onclick attribute to:

onclick="document.location.href = 'question2.html';"

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top