PDA

View Full Version : No pop ups on my Quiz form.


Zoso1
09-13-2009, 02:22 PM
Hi,

A bit basic this, but I am trying to create a quiz. I have followed an online tutorial which seems pretty straight forward, but it just does not work.

1 Created a form.
2 Added a radio button
3 Renamed the radio button
4 added an onclick, so that when the button is pressed a window says You are correct or please try again.

When I launch the page and press the radio button....nothing.

When I try the example form on the tutorial it works and a window pops up with a message.

I am obviously missing some code or not specifying something. I cannot go on to the more complex quiz of submitting the questions and returing correct/incorrect answers with percentages etc until i can get this simple one up and running. :(

Thanks.

Corrosive
09-13-2009, 02:25 PM
Have you got a link to the tutorial and then an example of your code plz?

Zoso1
09-13-2009, 03:49 PM
Hi, this is the link where I copied from, this works with pop up window.
http://www.webconcerns.co.uk/tutorial/stage_04_dreamweaver/dw_page09.asp

This is sample of my code :

<html>
<head>
<title>Quiz Test page </title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#CCCCFF" >
<form name="form1" method="post" action="">
<p>TEST QUIZ.</p>
<p>1.London is the capital of England?</p>
<p>
<input name="Question1" type="radio" value="True" onclick="alert('Well done that is correct')">
True</p>
<p>
<input name="Question1" type="radio" value="False" onclick="alert('Sorry please try again')">
False </p>
<p>&nbsp; <input type="radio" name="Sample" value="Click" onClick="alert('Thanks! This page will show you how to make a
quiz with pop-ups like this one.')">
Click me!</p>
<p>&nbsp;</p>
<p>&nbsp; </p>
</form>

Thanks.

Corrosive
09-14-2009, 11:18 AM
I can't see the difference between yours and theirs for the life of me! Very strange.

Zoso1
09-14-2009, 02:38 PM
Thanks Corrosive.

That's all I need, the worst kind of error in your code - one that looks correct but doesn't work. :sad: