Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing parameter from one jsp to another Jsp

Status
Not open for further replies.

kuha

Technical User
Oct 23, 2001
14
US
function xyz(arg1){
var mfname = arg1;
window.name="subwindow";
window.open("/web-inf/jsp/search.jsp?name=+mfname", "Search", "height=334 );
}
In the above code iam trying to pass parameter "name".but when subwindow pops up, i am not getting the value.
Please let me know how do i pass value.
Thanks in advance for al the help
 
If you are using a JSP the scriplet
<%
String nameParm = request.getParameter(&quot;name&quot;);
%>
will store the parameter in the Java variable nameParm

Hope this helps

Jeff
 
You've got the variable name INSIDE the quotes around the URL, so it won't be processed. Try it this way:
Code:
function xyz(arg1){
var theURL = &quot;/web-inf/jsp/search.jsp?name=&quot;+arg1;
window.name=&quot;subwindow&quot;;
window.open(theURL, &quot;Search&quot;, &quot;height=334&quot; );
}
BTW, you're also missing the closing quote after the height parameter.
Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Thank You Tracy i am able to get the value now.
Harish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top