Hidden input text submit with jquery
- by Lucas Silva de Freitas
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>