473,386 Members | 1,654 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,386 software developers and data experts.

Disabled textbox??

JS
I have a textbox and a button. Sometimes this textbox will be disabled and
other times it will be enabled. When its disabled I guess its value is null.
But is the the text string "null" or is it just nothing??

I have a function that will need to check the value of this textbox when its
disabled like:

<input name="search" type="text" id="search">

String word = (String)request.getParameter("search");

but when its disabled will it make sense to hold null in a String??
Jul 23 '05 #1
1 2141
JS wrote:
I have a textbox and a button. Sometimes this textbox will be disabled and
other times it will be enabled. When its disabled I guess its value is
null.
When it is disabled then its value is whatever its value is.
String word = (String)request.getParameter("search");


This looks like Java, not JavaScript. You seem to be in the wrong newsgroup.
When a control is disabled it is not a successful control. It won't be
submitted at all. What value your GET/POST parsing library allocates to it
depends on that library, it will be the same value you get if you try to
access any parameter which isn't included in the submitted form data (such
as getParameter("notInTheFormAsIJustMadeItUp").

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2

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

Similar topics

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...
3
by: Steve Le Monnier | last post by:
When you make a textbox control disabled ( txtText1.Enabled = false; ) You're left with grey text on a greyer background, which is not ideal. The Read-Only property is no use to me as I need to...
5
by: Robert Phillips | last post by:
I have a Panel control containing a few TextBox controls. The Panel is originally enabled, I enter data into the TextBox controls. When I submit, the Panel is disabled during the PostBack and the...
8
by: CsaaGuy | last post by:
I have a requirement to disable some textboxs depending on their contents. I choose to do this by invoking some javascript. When they change the contents, i disable the textbox they just put new...
3
by: Eric Moreau | last post by:
Hi I have a user that is visually impaired and who cannot read textboxes content when they are disabled. I have tried to inherits from the Textbox and overwrite the Paint method but I have...
0
by: sunny076 | last post by:
Hi, I am having difficulties creating a derived class for DisabledDataGridViewTextBoxColumn and cell when the VisualStyle is not supported. Basically I am down to either using ControlPaint or...
3
by: BrendanMcPherson | last post by:
How can I get a listbox to change a textbox on some selections. I have a listbox which only needs to be filled in on some selections. Is there a way I can have on some selections the textbox go...
7
by: garyusenet | last post by:
I'm using krypton toolkit which has allowed me to make a cool looking form. However, when I set my textbox to disabled it is 'greyed' out. The grey colour isn't in keeping with the office 2007...
1
by: hal | last post by:
I have a web page using javascript to enable/disabled an image button and switch its image when values are entered into a couple of textboxes. I have all that working fine, but my code considers a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.