Results 1 to 2 of 2

Thread: Calling a javascript function from jsp

  1. #1
    Junior Member
    Join Date
    Mar 2007
    Answers
    1

    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="showPopupLocal('<%=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


  2. #2
    Junior Member
    Join Date
    Feb 2007
    Answers
    10

    Re: Calling a javascript function from jsp

    did you imported that javascript class or not and clerify where exactly your getting problem.

    Regards,
    vardhan


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact