To pass a value to JSP you need to submit it to the page when opening it, if that makes sense. You cannot write directly to the variable, remember javascript runs on the client, java runs on the server. You must submit a request to the server to pass the values, by opening a page.
What you can do is to use javascript to open the page, so your javascript creates a link with relevant parameters to pass to the server when the next page is opened, though this is not something I do, it doesnt really seem worth the hassle.
I use javascript for rollovers etc. and to check form fields prior to submission, but pass the actual parameters from links/forms.
|