473,327 Members | 2,025 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,327 software developers and data experts.

DISABLED on HTML forms problem

Perhaps I am reading it wrong, but I assumed that the line below would
cause the value of 1 to be sent to the form. Instead it's sending a
0.

<input type="checkbox" name="email_00_notify" value="1" CHECKED
DISABLED>

So does that mena I am misreading it all and I need to not just CHECK
IT and DISABLE IT, but also include a hidden input element with a
1 ?????
Jan 13 '08 #1
3 2602
SergioQ wrote:
Perhaps I am reading it wrong, but I assumed that the line below would
cause the value of 1 to be sent to the form. Instead it's sending a
0.

<input type="checkbox" name="email_00_notify" value="1" CHECKED
DISABLED>
Since the control is disabled, it won't be successful. It shouldn't be
sending any value at all.
So does that mena I am misreading it all and I need to not just CHECK
IT and DISABLE IT, but also include a hidden input element with a
1 ?????
If you want the value 1 to be sent, then you should not disable the control.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
Jan 13 '08 #2
Scripsit David Dorward:
><input type="checkbox" name="email_00_notify" value="1" CHECKED
DISABLED>

Since the control is disabled, it won't be successful. It shouldn't be
sending any value at all.
And it probably doesn't. I'd guess that the form handler uses the value
of a field named "email_00_notify" without checking its existence, and
in the programming language used, a nonexistent value evaluates to 0 in
some contexts at least.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Jan 13 '08 #3
In our last episode,
<c1**********************************@m34g2000hsf. googlegroups.com>, the
lovely and talented SergioQ broadcast on
comp.infosystems.www.authoring.html:
Perhaps I am reading it wrong, but I assumed that the line below would
cause the value of 1 to be sent to the form. Instead it's sending a
0.
><input type="checkbox" name="email_00_notify" value="1" CHECKED
DISABLED>
A disabled control sends nothing at all. It is not sending a 0, but there
are plenty of ways that an undefined value might get interpreted as 0
depending on your handler. At any rate, the disabled control can never send
a 1 (or anything else). Disabled controls are little more than decoration;
they might be used to convey some kind of useful information to the user,
perhaps just a sense of continuity or orientation. But to POST or GET they
might as well be scrollwork.
So does that mena I am misreading it all and I need to not just CHECK
IT and DISABLE IT, but also include a hidden input element with a
1 ?????
You do not need the disabled control at all. If it is disabled, it doesn't
matter whehter it is checked or not. If you want the value to be sent, you
mnst set it in a control that is not disabled, and you can do that in a
hidden control.
--
Lars Eighner <http://larseighner.com/us****@larseighner.com
Countdown: 372 days to go.
Jan 14 '08 #4

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

Similar topics

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...
3
by: Kelly Domalik | last post by:
I would like to override the "disabled" property of a hidden field. When disabled is set to "true", it would call a function to disable 2 other text fields on the form. When disabled is set to...
1
by: Martin | last post by:
Is disabled to be set in the style of a tag just like visible? I am trying to set the whole content of a td tag to disabled like this, style='disabled:true' and it does not seem to work. Is this...
4
by: | last post by:
Please, help. I created my contol, ButtonX, which subclasses System.Forms.Windows.Button class. I am doing my own paiting, by overriding OnPaint and OnPaintBackground (without calling base...
3
by: Rachel Suddeth | last post by:
I didn't know what to put for a subject, so I just tell you a problem requirement they want for my ap. If the user hovers over a disabled control, they want a text bubble to explain why it's...
6
by: Stu Carter | last post by:
Hi, I have an aspx page where some controls are initially disabled by the code-behind 'Page_Load' event. I want these controls to be dynamically enabled when the user checks a checkbox. ...
1
by: Michael | last post by:
Can someone help me figure this out, I'm using the Visual Studio.NET 2003 IDE to develop asp.net pages, I've got the toolbox open to display all the "Web Forms" elements Here is my problem, on...
2
by: CreativeMind | last post by:
hi i have following code but problem is that when i debug both checkboxes have disabled property always false whether it is checked or unchecked..thx for help. function checkFinance(){ var...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.