Ho scritto pippo sul campo text..........riposto il codice:
pagina che processa:
codice:
<html>
<body>
<%
var=Request.querystring("artic2")
notif=Request.Form ("notte1")
response.write (notif)
response.end
strconn="Driver={Microsoft Access Driver (*.mdb)}; dbq="&Server.MapPath("intranet.mdb")
set Conn=Server.CreateObject("ADODB.Connection")
Conn.open strconn
Squ1="insert into appoggiofarmaco (farmaco, annota) values ('"&var&"','"¬if&"');"
conn.execute(squ1)
conn.close
set conn = nothing
%>
</body>
</html>
pagina dove c'è il form:
codice:
<html>
<head>
<script language="javascript" type = "text/javascript">
function vai(){
var test;
test="true";
if (test=="true")
{
document.tabella1.action="pAGINA.asp";
document.tabella1.submit();
}
}
</script>
</head>
<body>
'RECUPERO I DATI DALLA PRIMA TBL DEL DATABASE
<form name="form">
<%strconn="Driver={Microsoft Access Driver (*.mdb)}; dbq="&Server.MapPath("intranet.mdb")
set Conn=Server.CreateObject("ADODB.Connection")
Conn.open strconn%>
<select size="1" name="artic" style="font-size: 8 pt; font-family: Verdana" onChange="submit(this);">
<option value="TUTTI">------TUTTI------</option>
<%
sql = "SELECT GRUPPO FROM prontuario GROUP BY gruppo "
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql,conn
Do While Not rs.EOF%>
<option value="<%=rs("gruppo")%>"><%=rs("gruppo")%></option>
<%
rs.MoveNext
Loop
rs.Close
set rs = Nothing
%>
</select>
</form>
<form name="form" action="bott.asp">
'FACCIO POPOLARE LA SECONDA SELECT
<select size="1" name="artic2" style="font-size: 8 pt; font-family: Verdana" ;" >
<option value="TUTTE">------TUTTE------</option>
<%
COD = request.querystring("artic")
Set RS1 = Server.CreateObject("ADODB.Recordset")
sql1 = "select distinct denominazione from prontuario WHERE gruppo= '"&COD&"' "
rs1.open sql1, conn
Do While Not rs1.EOF%>
<option name="aaa" value="<%=RS1("denominazione")%>"><%=RS1("denominazione")%></option>
<%
RS1.Movenext
LooP
rs1.close
set rs1 = nothing
%>
</select>
<input type="text" name="notte"></input>
<input type="submit" value="conferma" >
<input type="hidden" name="notte1" value=<% = Replace(notte, " ", "%20") %>>
<%
conn.close
set conn = nothing
%>
</form>
</body>
</html>