calling a java script method from jsp
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sumit_Murgai
Posted On:   Saturday, March 30, 2002 03:32 AM

i want to call a java script method from a jsp page.and i want to pass a string as a parameter

Re: calling a java script method from jsp

Posted By:   Luigi_Viggiano  
Posted On:   Saturday, March 30, 2002 09:40 AM

From jsp you cannot run any Javascript. JSP runs on the server, Javascript runs on the client. You may want to use something like:



To run "myFunction" just after the page load. Or you may place the javascript function call in some place of your html using JSP. But there's no Java/JSP API to call JavaScript functions (they are not methods).

There's also some API to call JavaScript from an applet, it's called LiveConnect and it's featured by Netscape, but probably you don't need it.

About | Sitemap | Contact