Thursday, May 23, 2024
 Popular · Latest · Hot · Upcoming
134
rated 0 times [  138] [ 4]  / answers: 1 / hits: 183501  / 13 Years ago, mon, april 18, 2011, 12:00:00

Can anyone tell me how to pass JavaScript values to Scriptlet in JSP?


More From » java

 Answers
2

Your javascript values are client-side, your scriptlet is running server-side. So if you want to use your javascript variables in a scriptlet, you will need to submit them.



To achieve this, either store them in input fields and submit a form, or perform an ajax request. I suggest you look into JQuery for this.


[#92671] Friday, April 15, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
maureen

Total Points: 151
Total Questions: 110
Total Answers: 110

Location: Mali
Member since Fri, Dec 3, 2021
3 Years ago
;