Just as you do in HTML, however, to pass parameters, just use the <%= JSP
code %> inside the ( ) of a javascript function.

For example, I call my javascript function in the onload="" call of the
<body> tag with specific request information:

<body onload="<%= someBean.getXXX() %>">


I am not sure..but I think its ok to use ' ' instead of " ", so that if your
jsp code requires " " in the method call, it works, like so:

<body onload='<%= someBean.getXXX("test") %>'>

Maybe someone can answer that for sure?

> hi !
>
>         how can i call the javascript function in my jsp file. i want to
> pass the parameters also .
>
> advance thanks,

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to