469,337 Members | 5,934 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,337 developers. It's quick & easy.

How to pass value from jsp to javascript

kaleeswaran
132 100+
Hi,

Can any one tell me how to pass a value from jsp to javascript both being different files.. ie a.jsp , b.js.. I have a hidden value in jsp i want to get its value in the javascript file
Nov 19 '07 #1
1 1952
acoder
16,027 Expert Mod 8TB
This is not possible as far as I'm aware.

What you can do is something like the following within your JSP file:
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. var val = // echo JSP variable here...
  3.  
Nov 19 '07 #2

Post your reply

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

Similar topics

1 post views Thread by jiing.deng | last post: by
1 post views Thread by colleen1980 | last post: by
8 posts views Thread by BigZero | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.