Ho questo problema se seleziono dalla lista del menu utente, un nome qualsiasi, mi ricarica un nome predefinito togliendomi quello che avevo selezionato, perchè?
Vi posto tutto il codice della pagina, per farvi capire meglio:
<%
Dim sc, cn, rs
sc = "driver={Microsoft Access Driver (*.mdb)};dbq="
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open sc & Server.MapPath("../mdb-database/assistenza.mdb")
Set rs = Server.CreateObject("ADODB.Recordset")
%>
<html>
<head>
<title>Richiesta assistenza CED</title>
</head>
<body>
<%
strSQL="SELECT AZIENDA, UTENTE, CAUSALE FROM tabdati order by utente"
RS.Open strSQL, cn, 3, 3
%>
<h1>Richiesta assistenza CED</h1>
<form method="POST" action="inserisci.asp">
</p>
<table width="322" border="1">
<tr>
<td width="50" height="31">AZIENDA</td>
<td width="120"><label>
<select name="sceltaz"
onchange="window.location=('index.asp?view=Display &ID='+this.options[this.selectedIndex].value+'&daysprune=30')">
<%do while not rs.eof%>
<option value="<%=rs("azienda")%>"><%=rs("azienda")%></option>
<%
rs.movenext
loop
rs.movefirst
%>
</select>
</label></td>
</tr>
<tr>
<td>UTENTE</td>
<td>
<select name="sceltaut"
onchange="window.location=('index.asp?view=Display &ID='+this.options[this.selectedIndex].value+'&daysprune=30')">
<%do while not rs.eof%>
<option value="<%=rs("utente")%>" selected><%=rs("utente")%></option>
<%
rs.movenext
loop
%>
</select>
<%
rs.Close
set rs = Nothing
cn.close
set cn = nothing
%>
</td>
<tr>
<td>CAUSALE</td>
<td>
<select name="sceltacaus"
onchange="window.location=('index.asp?view=Display &ID='+this.options[this.selectedIndex].value+'&daysprune=30')">
<%do while not rs.eof%>
<option value="<%=rs("causale")%>"><%=rs("causale")%></option>
<%
rs.movenext
loop
%>
</select>
<%
rs.Close
set rs = Nothing
cn.close
set cn = nothing
%>
</td>
</tr>
</table>
DESCRIZIONE</p>
<label>
<textarea name="descrizione" id="descrizione" cols="45" rows="5"></textarea>
</label>
</p>
</p>
<input type="submit" value="Invia richiesta">
<input type="submit" value="Visualizza stato">
</p>
</form>

Rispondi quotando
