Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pass Value From JavaSript function to JSP page

 
amir thakur
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here's my code

here in above code iam geting the value of radio buttons which are coming from data base..
this code is running without any problem and show the value in the alert statment.
when i run it..
This whole code is in jsp page and i am using Javascript function for grouped radio button validation.
but now the problem is

how can i send the value of this var ch into an another JSP page...

what should i do before or after alert statement.

Do reply....
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I fixed your code tags, but the code is still a mess. You may want to go in an format it nicely.
 
Chris Hurst
Ranch Hand
Posts: 443
3
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you generate the URL for your new page request construct the URL with ch on the end as a parameter your new JSP can read ?ch=5 (or similar , other methods exist).

It would have helped if you had given us an example of where you request your next page.
 
amir thakur
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here's an example i want to send the ch=5 value to my index.jsp
Page so can you please tell me how to append this value to url of my index.jsp page.....

its nice if you tell me the code how to append this ch value....
and also tell me how to get this ch value into my index.jsp page
 
amir thakur
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what happen may any one help me to solve this above query......
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/index.jsp?ch=5
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic