Ittay Dror wrote:
The disabled elements are normally not submitted, but I wish they
were. How can I go about making elements appear to be disabled, but
still send them when the form is submitted.
Disabled form controls are not submitted by design (in W3C speak: 'they
are not successful').
Your options (in my order of my personal preference):
1. Re-engineer the application logic to not need to send disabled form
controls to the client in the first place.
2. Hidden fields
3. Use 'readonly' instead
4. Hidden fields *and* disabled fields (may confuse the user if disabled
data ends up being submitted?)
5. CSS styled to appear as disable (user may still modify data and you
don't know what 'disabled' looks like on all browsers)
6. Javascript to re-enable disabled form controls before form submission
(inaccessible and unreliable)
--
Andrew Urquhart
- FAQ:
www.jibbering.com/faq/
- Archive:
www.google.com/groups?q=comp.lang.javascript
- Contact:
www.andrewu.co.uk/contact/
- Employ me: Front/middle tier ASP developer with WAI & web standards