473,408 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

how to submit "disabled" form elements

Hi,

I have a form with various elements which, according to changes in
values become enabled or disabled.

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.

Thanx,
Ittay
Jul 23 '05 #1
1 11599
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
Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Askari | last post by:
Hi, I do a "perso"widget where have two scrolls (one vertical, one horizontal) for a canvas. When, the first time, I added widget in the canvas, the scroll self-ajust and when I move scrollbar,...
5
by: Jeremy Langworthy | last post by:
Hi I have two "totals" inputs whose values are dynamically calculated. For obvious reasons I don't want users to be able to edit the information in these. However, I do want this total passed to...
2
by: CES | last post by:
All, I'm at a loss, the code below works in IE but not in Netscape and I'm unskilled enough not to know why. Essentially this code looks thru all of the form fields and if the input box has a...
1
by: Kruse | last post by:
Hi, Is Possible to alter the "disabled" style? I have got <input name="test" value="1" disabled> This makes the input field gray and shadow.
5
by: Mark Hannon | last post by:
I have been researching the "disabled" property for form data and wanted to know: - Does the disabled property supress the form item from being submitted? - Can the disabled property be applied...
0
by: Dana Epp | last post by:
Anyone know how to set the "Disabled" imagelist in a C# Toolbar? Although the Microsoft's Toolbar ActiveX control in the mscomctl.ocx has such a property, there doesn't seem to be one for the C#...
1
by: Morten Plathe | last post by:
Hi, Is there a way to override the shadowed (grey) backcolor of a textbox when the textbox is disabled for input (textbox.enabled = false) ? In some cases I want to have a custom backcolor when...
1
by: Lars Netzel | last post by:
I have an application with MDIchildren... you have have several windows open at the same time and when I choose "Save" from the Parent Window (MDIContainer) I save the ActiveMDIChild. BUt.. I...
0
by: Curious | last post by:
Hi, I try to set up debugging environment in Visual Studio 2003. So I open the Properties of the project and select "Debugging". I'll need to at first enter "C:\Program Files\AutoTrade\MyTools...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.