Hidden input text submit with jquery
Posted
by
Lucas Silva de Freitas
on Stack Overflow
See other posts from Stack Overflow
or by Lucas Silva de Freitas
Published on 2013-10-21T03:49:45Z
Indexed on
2013/10/21
3:53 UTC
Read the original article
Hit count: 177
I have a javascript var that returns the value of a input text named "pro_barras", with the value of "pro_barras" I need to make a search in my database without submiting the page.
I can't use a javascript var in the java code, so i've setted the value in a hidden input text named "hidden_barra", but I need to submit it to get the value with the java code and make the search...How do I do it ?
<input type="text" id="pro_barras">
<input type="hidden" id="hidden_barra">
<script> var barra = document.getElementById('pro_barras').value;
document.getElementById('hidden_barra').value = barra;
var ref = <%=pd.getProdutosBarra(">VAR 'barra' HERE or request.getParameter("hidden_barra")<").getPro_referencia()%>;
</script>
© Stack Overflow or respective owner