File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes How can i print selected radio button value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How can i print selected radio button value" Watch "How can i print selected radio button value" New topic
Author

How can i print selected radio button value

R Sugan
Ranch Hand

Joined: Mar 13, 2009
Posts: 48
Hi,

Can any one help to me? How can i print selected radio button value using jsp.
Please give me any sample code.



Thanks.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Sugan, what do you actually want?? Please be more specific about your query as it is not easy to guess what you want...


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
R Sugan
Ranch Hand

Joined: Mar 13, 2009
Posts: 48
Hi,

Sorry sir, i need to how can i transfer into next jsp page through selected radio button onclick event.
Is it possible .


Thanks.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Just access it as request parameter.

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

R Sugan wrote:Sorry sir, i need to how can i transfer into next jsp page through selected radio button onclick event.
Is it possible .


First of all, don't call me SIR

Secondly, this is possible. You need to create a javascript event for the selection of the radio button and submit the related form in the javascript. It depends on what you want to do but I'll give a simple example

Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
As the input element is already inside a form, you don't need to know the form by id. Use this.form.submit().

But after all, this has essentially nothing to do with his initial question: printing the input value.
Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9291
    
  17

Bauke Scholtz wrote:As the input element is already inside a form, you don't need to know the form by id. Use this.form.submit().


Hmm, that's new to me. I've never heard that but surely I'll use this in the future

Bauke Scholtz wrote:But after all, this has essentially nothing to do with his initial question: printing the input value.


I thought this is his question. I got an idea because of this statement

R Sugan wrote:how can i transfer into next jsp page through selected radio button onclick event.
 
wood burning stoves
 
subject: How can i print selected radio button value
 
Similar Threads
Radio button value with submit
Selected radio button value to be send to action class
java script
validating textfield with +ve/-ve values using 2 radiobuttons
model for group of radio buttons