Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JSP (http://www.go4expert.com/forums/jsp/)
-   -   How to embed JavaScript code into JSP... (http://www.go4expert.com/forums/embed-javascript-code-jsp-t11469/)

caprisan06 19Jun2008 14:47

How to embed JavaScript code into JSP...
 
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.


All times are GMT +5.5. The time now is 08:01.