Hello all,
     Iam wondering whether I can use server side script to dynamically
generate functions inside SCRIPT and /SCRIPT tags.Iam using a code which
looks like this.
<SCRIPT language="javascript">
........
<% for(int k=1;k<10;k++) { %>

function myfunc_<%=k%>() {
//somecode in here
}

<% } %>



..........
</SCRIPT>
When I load this jsp page, Its giving a runtime error called "syntax
error".
If I ignore that error and view the source, it is showing the 10 functions
myfunc_1,myfunc_2 ....etc.
Is it actually possible to generate functions like this?
Please write back if anyone knows.This thing works in an ASP page!!!
Thanks,
Srihari.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to