Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaScript in JSP

 
Janaki Samaraweera
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have problem of assigning JS var value to Java.
I guess this is possible.
CAn anybody come up with any idea.
Your help is highly appriciated!
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Janaki
The only way to get a value from JavaScript to the server to be used by your servlet or JSP is to send it to the server in a request.
If you've got a value in JavaScript you can assign it to a textbox or hidden field or some other HTML element that will get sent to the server.
 
rohit poduval
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can have a hidden applet in the page and the JS can set properties of the applet class on whatever event. Does that help?
 
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!