I'll assume that the javascript is either in the JSP file or is
"included" in the JSP file. Place your variable assignment at the
top of the JSP file--before your javascript.
You should then be able to reference it in your javascript section as follows:
...
window.open('<%=forwardURL%>');
...
At 4:13 PM -0700 1/12/2001, Kevin Citron wrote:
>Does anyone know how to pass variable defined in JSP to a JavaScript
>function.
>
>Specifically. what I'm trying to do is something like this.
>
>//: In JSP
> forwardURL = aRequest.getParameter("forwardURL");
>
>//: In JavaScript
> window.open(forwardURL0;
>
>
>Thanks in advance.
>
>-----Original Message-----
>From: Frank Carlos [mailto:[EMAIL PROTECTED]]
>Sent: Monday, January 08, 2001 5:27 PM
>To: [EMAIL PROTECTED]
>Subject: Building servlets with session tracking and JSP
>
>
>Here's a new tutorial that teaches techniques for building Internet
>applications using servlet and JSP technology. A key point is to enable
>session handling, so the servlet knows which user is doing what. The
>tutorial shows a URL bookmarking system in which multiple users access a
>system to add, remove, and update an HTML listing of bookmarks. The servlet
>uses JSP technology to handle the user interaction... Servlet JSP Tutorial:
>http://www-105.ibm.com/developerworks/education.nsf/java-onlinecourse-bytitl
>e/80CC54124F0ABE25862569B300554AFB?Open&l=95,t=gr,p=Servlet-JSP-Tracking
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets