How to Assign JavaScript variable to Jsp Variable

R

Ranjan

Hi,
I want to assign javaScript variable to JSP variable.

<Script>
var conf=Confirm("Mess");
if(conf)
{
<% String str=conf; /// line 1
%>
}
else
{
}

i know line no 1 is wrong.
i did this way also.
<% String str ="<script>document.writeln(conf)</script>"; %>

but now string gives output <script>conf</script>

so plz short this problem. I read in lots of group so many wrote there
it may be the client side an d server side problem.

thanks,
Prabhat
 
E

Eliyahu Goldin

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top