Re: How can I access jsp variables from a JavaScript function in a Jsp page?
Re: How can I access jsp variables from a JavaScript function in a Jsp page?
Posted By:
Chilang_Shen
Posted On:
Sunday, April 8, 2001 06:22 AM
Perhaps there is some way to do this.
1. If you only want to use the variable value once , you can embed the jsp tag inside your JavaScript segment such as:
2. You can see the Resin project (www.caucho.com), which use JavaScript as a server side Script, but you can't use client side JavaScript access jsp variable directly!
Good luck my friends!!!
Re: How can I access jsp variables from a JavaScript function in a Jsp page?
Posted By:
John_Zukowski
Posted On:
Friday, April 6, 2001 06:04 AM
Essentially, you can't. The JSP variable doesn't exist when the JavaScript is running as JSP runs in the server and JavaScript runs in the browser. Some servers though support server-side JavaScript. Read the FAQ for pointers on those.