assigning return value of a javascript function to a variable
843840Aug 27 2008 — edited Aug 27 2008hi.
I have a javascript function which returns string.
I wanna assing return value of that function to variable.
for example:
<script>
funtion writeMe()
{
var ex;
ex="try"
return ex;
}
</script>
Then in body of JSP page. I wanna do something like:
<% String st;%>
Now I wanna assign the value that returned from writeMe function ("try") to st string.like:
<%st= writeMe();%>. but of course it doesn't work. how can I do that?