HighDots Forums  

Disabled textbox??

Javascript JavaScript language (comp.lang.javascript)


Discuss Disabled textbox?? in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JS
 
Posts: n/a

Default Disabled textbox?? - 06-01-2005 , 05:47 PM






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??



Reply With Quote
  #2  
Old   
David Dorward
 
Posts: n/a

Default Re: Disabled textbox?? - 06-01-2005 , 05:50 PM






JS wrote:

Quote:
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.

Quote:
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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.