Hi guys,
 
sorry for the OT, but I'm stumped with this JS problem and I know some of you are gurus with this stuff...
 
I've got a form with a checkbox and some text boxes. Initially the text boxes are disabled, using the code:
 
<input name="full_unc_path_to_server" type="text" value="" size="100" maxlength="255" disabled>
 
...and, when the checkbox is ticked, it has an onclick action that runs some _javascript_ 'toggle' code to enable the textboxes.

This all works absolutely fine. The problem is that, when the user submits the form, and I do some server-side validation of the inputs and find a problem, the user gets an error, and is told to click 'back' (and is presented with a <a href=""> link) to correct the error.
 
At this point, the form is still displaying the info that they have just entered previous to submitting the form, which is what I want. The problem is that if the checkbox mentioned above was checked before submitting the form, it is checked now; yet the text boxes are disabled. And if you uncheck the checkbox, the text boxes become active, as they're getting the toggle action from the _javascript_ code :)
 
I tried adding the below code to a function called with the body onLoad action, but that doesn't seem to work.
 
function StartPage ()
{
  if (document.form1.copied_to_server.checked == true)
    {
      ToggleUNC
    }
}
 
Any ideas guys?

Cheers,
John :)
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to