Ok, another query....
I have a checkbox at the bottom of my form which when checked unhides a <div> block which displays the submit button.
The problem I have is when the clear form button is pressed it removes the check but does not re-hide the submit <div> bit.
The way i see it, I have 3 options:
1) To simply remove the clear for button.
2) To exclude the said checkbox from the CLEAR button function.
3) To have the CLEAR button run an onlick to call the function which hides the submit button.
The latter would be my prefered. It sort of works in that the first click of the clear button clears the form, the second click calls the javascript which hides the <div> section.
This is the function which toggles the display:
[CODE=javascript]<script>
function toggle_display( ) {
var form = document.getEle mentById('hides ubmit');
var submit = document.getEle mentById('submi t_group');
((form.checked) ? submit.style.di splay='block': submit.style.di splay='none');
}
</script>[/CODE]
This is the lower part of the form which has the clear button in....
[HTML]<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">You may now click the SUBMIT button to
submit your e-Enrolment.</font><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="Submit" value="Submit!" >
</p>
</div>
<textarea rows="7" name="Authority " cols="30" style="width:75 3; font-weight:bold; height:116; font-family:Arial" wrap=virtual>AC CESS AUTHORISATION
I will tick the box to agree.....
</textarea><br>
<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>
<input type="reset" onClick="toggle _display();" value="Clear Form"/>
<input type="hidden" name="EOR" value="">
</form>[/HTML]
Can I throw this open to suggests/comments...
Regards
I have a checkbox at the bottom of my form which when checked unhides a <div> block which displays the submit button.
The problem I have is when the clear form button is pressed it removes the check but does not re-hide the submit <div> bit.
The way i see it, I have 3 options:
1) To simply remove the clear for button.
2) To exclude the said checkbox from the CLEAR button function.
3) To have the CLEAR button run an onlick to call the function which hides the submit button.
The latter would be my prefered. It sort of works in that the first click of the clear button clears the form, the second click calls the javascript which hides the <div> section.
This is the function which toggles the display:
[CODE=javascript]<script>
function toggle_display( ) {
var form = document.getEle mentById('hides ubmit');
var submit = document.getEle mentById('submi t_group');
((form.checked) ? submit.style.di splay='block': submit.style.di splay='none');
}
</script>[/CODE]
This is the lower part of the form which has the clear button in....
[HTML]<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">You may now click the SUBMIT button to
submit your e-Enrolment.</font><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="Submit" value="Submit!" >
</p>
</div>
<textarea rows="7" name="Authority " cols="30" style="width:75 3; font-weight:bold; height:116; font-family:Arial" wrap=virtual>AC CESS AUTHORISATION
I will tick the box to agree.....
</textarea><br>
<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>
<input type="reset" onClick="toggle _display();" value="Clear Form"/>
<input type="hidden" name="EOR" value="">
</form>[/HTML]
Can I throw this open to suggests/comments...
Regards
Comment