Buongiorno a tutti, data la mia poca conoscenza, vorrei, per cortesia, un aiuto su di un form di inserimento dati che possa svolgersi in un'unica pagina commpreso verifiche su ci� che viene digitato.
In questo modo evito che in presenza di errori di digitazione ritornando indietro i dati non vengono persi.
lo scritto il seguente:
codice:
<!-- #include file="../_INCLUDE/_MAT_comune.asp" --><!-- #include file="../03_valida.asp" -->
<%
'############################
Dim nuova, errore
nuova = Request.Form("nuova")
errore = 0
'############################
Dim n_ASS, n_RICH
var_n_ASS = Request("n_ASS")
var_n_RICH = Request("n_RICH")
'############################
Dim rich_REC, rich_impo
var_REC = Request.form("rich_REC")
var_impo = Request.form("rich_impo")
'############################
%>
<form method="POST" action="REC_ins_01.asp">
<%
'############################
SQL_record = "SELECT * from A3_record where id_ASS ="&var_n_ASS&" and id_RICH ="&var_n_RICH
Set rs_record = Conn_PROC.Execute(SQL_record)
while not rs_record.eof
%>
<div align="center">
<table border="0" width="800" cellspacing="0" cellpadding="0">
<tr>
<td height="20" width="500" colspan="2"><span id="etic_11_G_R">
<%
var_REC_1 = split(var_REC, ", ")
For a=0 TO UBound(var_REC_1)
If (nuova <> "" And Len(var_REC_1(a))=0) then
Response.Write "ERRORE: IL VALORE RELATIVO ALLA D. EVENTO NON E' STATO VALORIZZATO O DATO NON CORRETTO - GG/MM/AAAA"
errore = errore + 1
end if
next
%>
</span></td>
<td height="20" width="300"></td>
</tr>
<tr>
<td height="20" width="350"><input type="text" name="rich_REC" size="35" maxlength="30" tabindex="1" title="CODICE" class="ins_testo" value="<%=var_REC_1%>"/></td>
<td height="20" width="150"><input type="text" name="rich_impo" size="10" maxlength="8" tabindex="1" title="IMPORTO" class="ins_testo" value="<%=var_impo%>"/></td>
<td height="20" width="300"></td>
</tr>
</table>
</div>
<%
'############################
rs_record.movenext
wend
rs_record.Close
Set rs_record = Nothing
'############################
%>
</form>
<%
'##################################################################################################
If nuova <> "" And errore = 0 Then
response.write "INSERISCO"
end id
'##################################################################################################
Grato per il vostro aiuto, buon fine settimana