gaudi8
11-25-2002, 10:06 PM
My challenge is how to write to a database via a Form.
For example, here is the current HTML code for a button from my Form.
<TD colspan=2><input type="button" value="Decline" onclick="apform(this)" style="width: 100%" value2='<%=rs(0)%>' value3='Declined'></TD>
Value2 is the unique identifier (column 0) for the current record. It is used in a Javascript function "apform(this)" in the Form to create a record. The record is posted to an ACCESS database on the server via SQL script also on the Form. Value3 is the data written.
funtion apform(fv)
{
uptrain.appr.value=fv.value3;
uptrain.id.value=fv.value2;
uptrain.submit();
}
where formname.columnname.value
sample SQL:
conn.execute("update table set column="something" where id= "&request.form("id")
I can't figure out how to define value3 for a textbox on the form.
<TD colspan=2><input type="text" value="Comments" onclick="apform(this)" style="width: 100%" value2='<%=rs(0)%>' value3='???????'></TD>
For example, here is the current HTML code for a button from my Form.
<TD colspan=2><input type="button" value="Decline" onclick="apform(this)" style="width: 100%" value2='<%=rs(0)%>' value3='Declined'></TD>
Value2 is the unique identifier (column 0) for the current record. It is used in a Javascript function "apform(this)" in the Form to create a record. The record is posted to an ACCESS database on the server via SQL script also on the Form. Value3 is the data written.
funtion apform(fv)
{
uptrain.appr.value=fv.value3;
uptrain.id.value=fv.value2;
uptrain.submit();
}
where formname.columnname.value
sample SQL:
conn.execute("update table set column="something" where id= "&request.form("id")
I can't figure out how to define value3 for a textbox on the form.
<TD colspan=2><input type="text" value="Comments" onclick="apform(this)" style="width: 100%" value2='<%=rs(0)%>' value3='???????'></TD>