how to get values sent by location.replace(URL)

Posted by kawtousse on Stack Overflow See other posts from Stack Overflow or by kawtousse
Published on 2010-05-14T05:57:11Z Indexed on 2010/05/14 6:04 UTC
Read the original article Hit count: 141

Filed under:

hi everyone,

In my javascript function I do livke this in order to redirect parameters to servlet:

var ids1=document.getElementById("projet").value;

document.location.href("http://localhost:8080/Opc_Web_App/ServletAffectation?ids1="+ids1);

and in the servlet I do the following to get Value:

String idprojet= request.getParameter("projet");
     System.out.println("le projet selectionné est :" +idprojet);

the problem that i didnt have the result of System.out.print in my screen; so in other terms the servlet didn't get the parameter.

I can not see the problemn untill now. Please help. Thank you.

© Stack Overflow or respective owner

Related posts about JavaScript