devo fare una ricerca in database di un prodotto immesso da input.il prodotto cercato me lo stamperà poi in una nuova pagina.ho provato in questo modo ma nell'url non campare il parametro immesso:
codice:
<html>
<head>
<title>'ricerca.jsp'</title>
<script type="text/javascript">
function CercaProd() {
<%String nome_prod=request.getParameter("T1");%>
location.href=("listaprodotti2.jsp?name=<%=nome_prod%>");
}
</script>
</head>
<body>
<form method="POST" >
<div align="center">
<table width="49%" id="table1">
<tr>
<td width="242">Nome</td>
<td></td>
<td>Prezzo</td>
</tr>
<tr>
<td width="242">
<input type="text" name="T1" size="20"></p>
</td>
<td></td>
<td>
<input type="text" name="T2" size="20"></p></td>
</tr>
<tr>
<td height="68" width="242"></td>
<td height="68">
<p align="center"><input type="submit" value="Cerca" name="B3" onclick="CercaProd()"></p>
</td>
<td height="68"></td>
</tr>
</table>
</div>
</form>
</body>
</html>
grazie di nuovo!!