Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can i execute JavaScript Function from JSP For ... Loop

Status
Not open for further replies.

thangarajk

Programmer
Apr 22, 2001
4
0
0
US
I have javascript function called "calcul" with one paramter named "val1".

In JSP
======
For(int 1=0;i<=10;i++)
{

//Here how can i execute javascript function

}

Thankx in advance


 
You can't...

anyone? --
Tim <tim@planetedge.co.uk>
 
i think tiz is right. jsp is processed on the server whereas javascript is client side. so to access a javascript funtion i would think the page would have to be loaded into the client browser, this means that jsp has finished processing.

correct me if im wrong and the circus leaves town...
 
You can call a JavaScript function on the server within a JavaServer page. But this depends on the implementation platform. Engines that support both JavaScript and JavaServer Pages would probably allow you to do a mix and match of both scripts. You may want to look at the server configuration docs for more help.
 
Can't you just implement the JavaScript function in Java and call it from the JSP?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top