Calling a javascript function from jsp
Hi,
I have some HTML code wherein I am calling a javascript function on click of a button.
<TD>
<INPUT TYPE=text CLASS="input-body" NAME="<%=enr_proj_name_attr%>" VALUE="<%=enr_proj_name%>" onkeypress="enterKeySubmit(event)" >
<input type="button" value="..." name="popupButton"
onClick="[B]showPopupLocal[/B]('<%=item_handle%>', '<%=class_name%>', '<%=dialog_class%>', 'valid_values_popup', 'TemplateForm',
'<%=proj_name%>', '<%=enr_proj_prompt%>', event);">
</TD>
The enr_proj_prompt value comes from the jspcode..
For French locale the value contains an apostrophe in it
enr_proj_prompt gets substuted as ' ID de projet d'inscription'.
Due the presence of the apostrophe in the value the showPopupLocal() does not recognize all its parameters and does not get called.
I know I must append an escape character to the string before passing it to the javascipt function.
I have written another javascript function to do this.But now my problem is to call this function from the jsp code wherein I get the original value of the variable.Please advice
Re: Calling a javascript function from jsp
did you imported that javascript class or not and clerify where exactly your getting problem.
Regards,
vardhan