It works fine in Firefox 2+ but in IE7 the alert window doesnt appear and the script doesnt work.
Maybe I'm missing something
Heres the form the script is tied to:
[HTML] <form id="Quiz" name="Quiz" method="get" >
<table width="405" table="table" height="24" border="0" align="center">
<!--DWLayoutTable-->
<tr>
<td width="96" valign="top" bgcolor="#990000"><span class="style1"><font color="#FFFFFF" face="Arial, Helvetica, sans-serif"><strong>Answer</strong></font></span></td>
<td width="299" rowspan="2" valign="top"><label>
<input name="Answer" type="text" id="Answer" size="34" />
</label></td>
</tr>
<tr>
<td height="39" colspan="2">
<div align="left"><label>
<input type="submit" name="Submit" value="Submit" onClick="checkAnswer(this.form)" />
</label>
</div></td>
</tr>
</table>
</form>[/HTML]
Heres the script, its an external script preloaded in the head section:
- function checkAnswer (form)
-
{
-
var Answer = form.Answer.value;
-
if (Answer == "clarkston park")
-
{
-
alert ("!!!! Yes you are Correct !!!! ... Your gift will be there from 12:45pm - 1:15pm")
-
}
-
else if (Answer == "Clarkston Park")
-
{
-
alert ("!!!! You are Correct !!!! ... Your gift will be there from 12:45pm - 1:15pm");
-
location = "http://someplace.com";
-
}
-
else
-
{
-
alert ("You are Incorrect. Please try again. **Hint: C.P.**")
-
}
-
}