dennic
02-06-2003, 10:51 PM
hi
im making a form page, and am just wondering why when the user goes to click on the submit button that they can also click outside the button to dp the same function. the clickable area seems to take up the whole row of where the submit button is.
here is the code
<SCRIPT LANGUAGE="javascript">
<!--
function check() {
g=document.declaration;
if(g.disagree.checked==true && g.agree.checked==true){
alert("You cant tick both boxes!");
return false;
} else if(g.disagree.checked==true){
alert("You can't proceed");
return false;
} else if(g.agree.checked==true) {
return true;
} else {
alert("You havent ticked a box!")
return false;
}
}
//-->
</SCRIPT>
<!--Start of declaration form-->
<form name="declaration" action="applications.html">
<center>
<input type="checkbox" id="disagree" value="declaration" />Disagree
<input type="checkbox" id="agree" value="declaration" />I agree
</center>
<br>
<br>
<a href="applications.html" onClick="return check();">
<center>
<input type="submit" value="Begin" name="applications" align="right" >
</center>
</a>
</form>
<!--End of form-->
im making a form page, and am just wondering why when the user goes to click on the submit button that they can also click outside the button to dp the same function. the clickable area seems to take up the whole row of where the submit button is.
here is the code
<SCRIPT LANGUAGE="javascript">
<!--
function check() {
g=document.declaration;
if(g.disagree.checked==true && g.agree.checked==true){
alert("You cant tick both boxes!");
return false;
} else if(g.disagree.checked==true){
alert("You can't proceed");
return false;
} else if(g.agree.checked==true) {
return true;
} else {
alert("You havent ticked a box!")
return false;
}
}
//-->
</SCRIPT>
<!--Start of declaration form-->
<form name="declaration" action="applications.html">
<center>
<input type="checkbox" id="disagree" value="declaration" />Disagree
<input type="checkbox" id="agree" value="declaration" />I agree
</center>
<br>
<br>
<a href="applications.html" onClick="return check();">
<center>
<input type="submit" value="Begin" name="applications" align="right" >
</center>
</a>
</form>
<!--End of form-->