ClueLess
11-08-2002, 02:51 PM
What is wrong with this script? It seems like work fine. But when I check the checkbox, it shows “Error on page.” How can I fix this error? Thanks for your help
<html>
<head>
<title>Untitled</title>
</head>
<body>
<script LANGUAGE="JavaScript">
agree = 0; // 0 means 'no', 1 means 'yes'
// Yes = allowing users enter new info.
// No = Not allowing users enter any info.
</script>
<form action="InfoEdit.asp" method="post" name="SubmitForm" onsubmit="ShowAmendmentDate()">
<legend class="largeHeadingBlack"><em>Information</em></legend>
<table border='0'>
<tr>
<td width="40" align="right" class="regularParagraph">
<input type="checkbox" name='accepted' value='agree' onClick="agree=1; documentwin.SubmitForm.box.focus();">
</td>
<td width="250" class="regularParagraph">
<font color="red"><em><b>Check before Add New Information</b></em></font>
</td>
</tr>
<tr>
<td width="40" align="right" class="SmallHeadingBurg"> <font color="red">*</font></td>
<td class="SmallHeadingBurg" width="180"> Name: </td>
<td class="regularParagraph" align="left">
<input type="text" id="LPName" name="LPName" value="" onFocus="if (!agree)this.blur();" maxlength="30" size="38">
</td>
</tr>
<tr>
<td>
<input type="submit" value="Update" name="Update" onclick="DoConfirm()" class="ActionButton">
</td>
</tr>
</table>
</body>
</html>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<script LANGUAGE="JavaScript">
agree = 0; // 0 means 'no', 1 means 'yes'
// Yes = allowing users enter new info.
// No = Not allowing users enter any info.
</script>
<form action="InfoEdit.asp" method="post" name="SubmitForm" onsubmit="ShowAmendmentDate()">
<legend class="largeHeadingBlack"><em>Information</em></legend>
<table border='0'>
<tr>
<td width="40" align="right" class="regularParagraph">
<input type="checkbox" name='accepted' value='agree' onClick="agree=1; documentwin.SubmitForm.box.focus();">
</td>
<td width="250" class="regularParagraph">
<font color="red"><em><b>Check before Add New Information</b></em></font>
</td>
</tr>
<tr>
<td width="40" align="right" class="SmallHeadingBurg"> <font color="red">*</font></td>
<td class="SmallHeadingBurg" width="180"> Name: </td>
<td class="regularParagraph" align="left">
<input type="text" id="LPName" name="LPName" value="" onFocus="if (!agree)this.blur();" maxlength="30" size="38">
</td>
</tr>
<tr>
<td>
<input type="submit" value="Update" name="Update" onclick="DoConfirm()" class="ActionButton">
</td>
</tr>
</table>
</body>
</html>