By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,949 Members | 946 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,949 IT Pros & Developers. It's quick & easy.

how to pass jsp value in using java script to another jsp

P: 13
this is the my java script function

Expand|Select|Wrap|Line Numbers
  1. function  operation(){
  2.  
  3.     var frm = document.getElementById("frm"); 
  4.     frm.action="second.jsp?n1="+<%=newname%>;
  5. }
  6.  
  7.  
  8.  
  9. some jsp code
  10. <form name="frm" method="post">
  11. <%=String newname=name[i]%>
  12. .
  13. .
  14. .
  15. </form>
Feb 5 '14 #1

✓ answered by Dormilich

var link = "second.jsp?name="+name+"&name2="+name2;

Share this Question
Share on Google+
4 Replies


Dormilich
Expert Mod 5K+
P: 8,639
not at all. JSP and JavaScript have different execution times.
Feb 5 '14 #2

P: 13
thank you... i try another way but there also a problem

i want to send multiple value to another page....this is worked for one value.but i want to send more parameters...can you help me



Expand|Select|Wrap|Line Numbers
  1. function  operation(name,email,pass){
  2.  
  3.  
  4.       var link = "second.jsp?name="+name;
  5.       window.open(link);
  6.  
  7. }
Feb 5 '14 #3

Dormilich
Expert Mod 5K+
P: 8,639
var link = "second.jsp?name="+name+"&name2="+name2;
Feb 5 '14 #4

P: 13
thanks it working 100%...........thanks again.
Feb 5 '14 #5

Post your reply

Sign in to post your reply or Sign up for a free account.