Click to See Complete Forum and Search --> : Problem with enabling and disabling


pickle
01-15-2003, 07:53 PM
I've have a form and i would disable certain elements according to the value selected from the drop down box. I managed to disable the elements, but I can't enable it back...
i've tried
document.reportForm.text1.enabled="true"
as well as
document.reportForm.text1.disabled="false"

I really don't know why but does enabling require the page to be refreshed?

Hope to get some replies soon....Thanks in advance

aspro
01-15-2003, 07:55 PM
I have the same problem but i can't get my fields to disable or enable.
how did you get yours to do it??

pickle
01-15-2003, 08:00 PM
just do this

document.form.text1.disabled="true"

aspro
01-15-2003, 08:01 PM
but on what condition?
like do u want it to enable only ewhen a specific option is selected in the drop down menu?

pickle
01-15-2003, 08:05 PM
In my case, it's the value from the drop down box..
I don't know what type of evaluation that you want to do...

if(document.form.optionBox.value=="1"){
document.form.text1.disabled="true";
}

pickle
01-15-2003, 08:17 PM
I hope to get some replies regarding my question soon...

pyro
01-15-2003, 09:17 PM
Take a look at this. http://forums.webdeveloper.com/showthread.php?s=&threadid=2420