Hi
I have a check box which when ticked displays the sumit buttons of a form and gives the checkbox field a value of "agree".
I would like to set the check box to hide the section of the form if the check is removed.
I have included a small sample code from my form:
[HTML]<html>
<script>
function toggle_display( ) {
var form = document.getEle mentById('hides ubmit');
var thanks = document.getEle mentById('submi t_group');
form.style.disp lay ='none';
thanks.style.di splay='block';
}
</script>
</head>
<body>
<form method="post" action="mailto: email@web.com?s ubject=EnrolReq " enctype="text/plain" subject="New User" name="FrontPage _Form1" onSubmit="retur n FrontPage_Form1 _Validator(this )" language="JavaS cript">
<table border="0" width="70%" id="table4" height="82">
<input type="checkbox" name="agreechec k" id="hidesubmit " value="Agreed" onClick="toggle _display();"/>
By placing a check in the box you are agreeing to the above Access Authorisation Statement.</font></b></p>
<div id="submit_grou p" style="display: none;">
<table border="0" width="70%" id="table22" bgcolor="#CCFFF F">
<tr>
<td>
<p align="center"> <font size="2">When you click 'Submit' a screen will pop up indicating a program is sending an Email on your behalf.<br>
<b>You must click YES to submit the form.</b></font></td>
</tr>
</table>
<p>
<input type="hidden" name="EOR" value="">
<input type="Submit" value="Submit!" >
<input type="reset" value="Clear Form">
</p>
</div>
</form>
</body>
</html>[/HTML]
It's a break donw of the form but the probelm is from line 16. It works one way (it displays the extra bit of the form) but dowsn't hide it again if the check is removed...
Any ideas???
I have a check box which when ticked displays the sumit buttons of a form and gives the checkbox field a value of "agree".
I would like to set the check box to hide the section of the form if the check is removed.
I have included a small sample code from my form:
[HTML]<html>
<script>
function toggle_display( ) {
var form = document.getEle mentById('hides ubmit');
var thanks = document.getEle mentById('submi t_group');
form.style.disp lay ='none';
thanks.style.di splay='block';
}
</script>
</head>
<body>
<form method="post" action="mailto: email@web.com?s ubject=EnrolReq " enctype="text/plain" subject="New User" name="FrontPage _Form1" onSubmit="retur n FrontPage_Form1 _Validator(this )" language="JavaS cript">
<table border="0" width="70%" id="table4" height="82">
<input type="checkbox" name="agreechec k" id="hidesubmit " value="Agreed" onClick="toggle _display();"/>
By placing a check in the box you are agreeing to the above Access Authorisation Statement.</font></b></p>
<div id="submit_grou p" style="display: none;">
<table border="0" width="70%" id="table22" bgcolor="#CCFFF F">
<tr>
<td>
<p align="center"> <font size="2">When you click 'Submit' a screen will pop up indicating a program is sending an Email on your behalf.<br>
<b>You must click YES to submit the form.</b></font></td>
</tr>
</table>
<p>
<input type="hidden" name="EOR" value="">
<input type="Submit" value="Submit!" >
<input type="reset" value="Clear Form">
</p>
</div>
</form>
</body>
</html>[/HTML]
It's a break donw of the form but the probelm is from line 16. It works one way (it displays the extra bit of the form) but dowsn't hide it again if the check is removed...
Any ideas???
Comment