Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Radio button value null in servlet  RSS feed

 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I have the following radio buttons.



Radio button value is pre set in javascript using :


Now My questions is:
in Servlet, by doing request.getParameter("emplOrNonemplRButton"),I get null value. why am I not getting the values pre-set in JSP ???
If I remove the disabled from <input type="radio"> tag , it works fine. it's causing problem becasue I have specified disabled

Thanks in advance.
- Anand
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anand,
That's how browsers work. Disabling a field sets it to "no value" when the form is submitted. In Java, that is null.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!