hi all
i am resetting my form with the following:
<script type="text/javascript">
window.onload = function () {
document.getElementsByName("email_address")[0].value = "";
document.getElementsByName("remove")[0].value = "off";
}
</script>
the problem is that the checkbox "remove" seems to get reset before the server side script can run. So in effect what ever the user selected on the checkbox is overridden and set to off before the php script can be run. Yet, the input box "email_address" is fine...
the test...
//this is already set to OFF by the time we get here....even if the user may have ticked the checkbox to ON
echo $HTTP_GET_VARS['remove'];
//this is fine, the email_address input is read and not reset...
echo $HTTP_GET_VARS['email_address'];
can any one explain this? I obviously want the form to be reset AFTER my server side script is done processing , yet for some reason it resets the checkbox early, yet the input box is ok...
thank you!