Question

I want to pass a javascript variable to a scriptlet tag. below is my code, i am using scriptlet tags inside a jsp page:

    <script>
    function concur(look){
    alert(look);
    <%
    String lk=request.getParameter("look");
    con.writing("HeyWow ",lk);%>        
    </script>

i want to pass the value of the string 'look' as an argument to the function 'writing'.

can anyone tell me how to do this ?

thanks

Était-ce utile?

La solution

This question and answers may help you. It was asked by me earlier today :)

Javascript variable in asp block code

Good luck!

Autres conseils

You have to submit your form to server as a normal submit process or via ajax call and only after that to have access to variables in the request.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top