Hello all,
I am stuck with my problem, and being a JS novice, I need your help. I'd appreciate it if anyone could.
I have a page, in which depending on value selected from dropdown-1 (for example), I need to disable or enable few other elements in the page.
I then need to send all these values via form submit to another page. Problem is, I discovered that disabled elements cannot be sent via form submits.
My solution is that I use the readOnly property, instead of disabled. But the following code:
The field myElement in my case is a drop down.
Thanks for the help.
Regards,
Trupti
I am stuck with my problem, and being a JS novice, I need your help. I'd appreciate it if anyone could.
I have a page, in which depending on value selected from dropdown-1 (for example), I need to disable or enable few other elements in the page.
I then need to send all these values via form submit to another page. Problem is, I discovered that disabled elements cannot be sent via form submits.
My solution is that I use the readOnly property, instead of disabled. But the following code:
Code:
if (value == "Ordered" || value == "Planned") { document.myForm.myElement.readOnly = false; } else if (value != "Disposed") { document.equipment.myElement.readOnly = true; }
Thanks for the help.
Regards,
Trupti
Comment