Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2008

Tip: Looking for answers? Try searching our database.

Retrieve Parameter Value from Disabled Input

Thread view: 
Sisilla - 03 Mar 2008 20:05 GMT
Hello All,

I am setting the value of a disabled text input form element with
JavaScript. How can I retrieve its value in Java?

                        request.getParameter(textInputID);

always seems to return 'null'.

I appreciate any effort to help me. Thank you for your time and
consideration.

Sincerely,

Sisilla
Lew - 03 Mar 2008 20:18 GMT
> I am setting the value of a disabled text input form element with
> JavaScript. How can I retrieve its value in Java?
>
>                          request.getParameter(textInputID);
>
> always seems to return 'null'.

<http://www.w3schools.com/tags/tag_input.asp>
The 'disabled' attribute "[d]isables the input element when it first loads so
that the user can not write text in it, or select it."

So it is never entered into the request as a parameter.

Thus a server-side attempt to retrieve this value that was never entered into
the parameter list will always receive null.  Because the parameter isn't
there.  Because its input was disabled.

Signature

Lew

Sisilla - 05 Mar 2008 19:20 GMT
Thanks, Lew. I made the element read-only instead of disabled and used
css to give it the look of a disabled element. Thanks for your help.
~Sisilla


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.