• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can i print selected radio button value

 
R Sugan
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sugan, what do you actually want?? Please be more specific about your query as it is not easy to guess what you want...
 
R Sugan
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just access it as request parameter.

 
Ankit Garg
Sheriff
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9519
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic