This question already has an answer here:
Eg : I have var a=10; now i want to use value of 'a' in jsp tag like
<% int b= "how to store javascript variable here"
%>
This question already has an answer here: Eg : I have var a=10; now i want to use value of 'a' in jsp tag like
|
|||
|
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
Try Writing the JavaScript variable in the page itself using
To access the javascript variable in server side code, You need to send it as part of POST Data. You can use a Hidden field and assign the value and later you can access the same using | |||||||||
|
That's not possible. You need to read up on the difference between client-side and server-side. This is a really good post: | |||||||||
|