1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to embed JavaScript code into JSP...

Discussion in 'JSP' started by caprisan06, Jun 19, 2008.

  1. caprisan06

    caprisan06 New Member

    Joined:
    Jun 19, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I want to write the below javascript code into my JSP page directly...Can you please help?

    JSP code...

    <span class="mini">
    <html:link href="#" styleClass="bouton" onclick="return submit_form_with_parameters('delegationForm', 'delegation', 'noInit=Y');">
    <bean:message key="rh2u.deleg.label.etape0.label.chercher" />
    </html:link>
    </span>

    JavaScript code...

    function submit_form_with_parameters(strFormName, strAction, parameters){
    objForm = eval("document." + strFormName);
    objForm.action = strAction + ".do?" + parameters;
    objForm.submit();

    I want to write the function submit_form_with_parameters directly into JSP page.
     

Share This Page