java - Why can't I access the value of the field in jsp (it returns null)? -


i've following javascript function:

function confirmaenviar()     {                     document.getelementbyid("data").value =clave2.value;          alert(document.getelementbyid("data").value);    more code here 

where check i'm able asign new value tu data;

data being defined this:

 <form action="client.json" method="post" name="usuario" id="usuario">   more code here   <input  type="hidden" name="data" id="data" value="prueba" />   more code here   </form> 

later on jsp part:

      <div><a href="javascript:void();" onclick="           javascript:if(confirmaenviar())$('#usuario').submit();   <% <%  more code here   string str= request.getparameter("data"); 

str null, can point me out do?

thanks.

i think have change attribute action="client.json" action="client.jsp" .

may page can't request parameters.. suppose.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -