User Supplied Javascript function Name for filter input validation.
Mydb.dbFilterValidatename="Javascript Function Name"
Pay attention to case sensitive JS property.
This simple example supply a confirmation propmt before submit.
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function MyJS() {
answer = confirm("U sure?");
if (answer == "true") {
return true; // accept the submit
}else{
return false; // go back to the form
}
}
</SCRIPT>
</HEAD>
<script language="VB" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim JS As New tornado.z()
With JS
.dbQP = "U=1| D=NWIND| S=8| GDF=0,1,2,3| Ni=b5,update,add| euf=0,1,2|" & _
"eaf=0,1,2| bm=customers;0| TH=title=JS"
.dbEditValidateName = "MyJS()"
.dbSQL = "Select * From customers where customerID = 'FRANK'"
.ASPdbNET()
End With
End Sub
</script>
z Class | Tornado Namespace | dbEditValidateName | Special Topic - Edit