i want to pass the javascript variable to jsp tag. i dont know how to pass this value. And also i am looking for how to pass form hidden variable to the same web page in jsp. there is any method to collect form hidden variable in javascript and pass it to the jsp tag on the same wep page
1 Answer
You can't.
JSP executes on the server. A document is sent to the client. JavaScript executes on the client (by which time it is too late to get new data into the JSP for this document).
To get data from the client back to the server you need to issue a new HTTP request:
- Follow a link
- Set
location - Submit a form
- Use XMLHttpRequest
- Visit a URI in an iframe
1 Comment
Sidharath
thanx David ...your suggestion helps me alot...:)