<form name="scateg" action="?visual=true" method="post">SCat <%= scatx %>
<select name="sel_scat" class="inputtext" onChange="document.scateg.submit();" >
<option value="">Seleziona
<%
SQLsc = " SELECT * FROM Scategorie WHERE ID ORDER BY Scategoria ASC"
Set RSsc = Conn.Execute(SQLsc)
if not RSsc.EOF then
RSsc.MoveFirst
Do While Not RSsc.EOF
Dim isSel, x
isSel = ""
x = Cint(RSsc("ID"))
if x = Cint(scatx) then
isSel = " selected"
end if
%>
<option value="<%= RSsc("ID") %>" <%= isSel %> ><%= RSsc("Scategoria") %>
<%
RSsc.MoveNext
Loop
End If
%></option></select>
</form></td>
<td width="4"></td>
<td width="176" valign="top">
<form name="categ" action="?visual=true" method="post">Cat <%= catx %>
<select name="sel_cat" class="inputtext" onChange="document.categ.submit();">
<option value=null>Seleziona
<%
SQLc = " SELECT * FROM categorie WHERE SCategoria LIKE '%" & scatx & "%' ORDER BY Scategoria ASC"
Set RSc = Conn.Execute(SQLc)
if not RSc.EOF then
RSc.MoveFirst
Do While Not RSc.EOF
Dim isSel2, y
isSel2 = ""
y = Cint(RSc("ID"))
if y = Cint(catx) then
isSel2 = " selected"
end if
%>
<option value="<%= RSc("ID") %>" <%= isSel2 %> ><%= RSc("categoria") %>
<%
RSc.MoveNext
Loop
End If
%></select></td>