Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp+javascript  RSS feed

 
vikas mishra
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

can any body tell me how can i use javascript variables with jsp and vise versa.
 
Mukta Rao
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can pass the JSP variable as an argument to the javascript function. But I dont have any idea to do the reverse. But I wonder why you need to use the javascript variable in the JSP function.

Thanks
Mukta
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP and Javascript cannot interoperate. JSP is executed on the server to format and send the HTML page to the browser. Your JSP can dynamically create the Javascript that will be executed when it gets there, but that's the extent to which they intersect.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!