Hi all
 
can i access a javascript method within jsp...............
 
what i mean to say is can i do something like this..
the code below is not working....So is there any alternative to do this..........
 
code is as follows...........
 
<html>
<%! int x=10; %>
<%! int y=20; %>
<%! int z; %>
<% z=addnos(x,y) %>
<% System.out.println("the sum is :"+z); %>      
 
<head>
<SCRIPT LANGUAGE="javascript">
 function addnos(var a,var b) {
 var c=a+b;
 return c;
}
</SCRIPT>
</head>
</html>
 
Thanks & Bye
KJV
 

Reply via email to