Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

using JSP parameters as input in a JavaScript function

843840Jan 23 2008 — edited Jan 24 2008
hey

I have a JavaScript function, which I call with JSP parameters.
The function call looks similar to:

<button onclick="myFunction(<%= jspParameter%>);"> </button>

However, this JavaScript function is called from a jsp page, which is asynchronously refreshed upon a click of the button.

The problem is that the JavaScript function does NOT function when I click the button for the first time (or maybe it functions, but with the old value of the jspParameter).
Only after the second click it starts taking the jspParameter.


Can you please tell me how to properly get the jspParameter as input in my case....


thank you
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 21 2008
Added on Jan 23 2008
13 comments
320 views