User Supplied Javascript function Name for Edit input validation.
Mydb.dbEditValidateName="Javascript Function Name"
Pay attention to case sensitive JS property. If the O/S mistaken this JS code emit for JS virus attack, then fall back on the hard code approach.
This simple example is different than the one in dbFilterValidateName. It uses SendHead to emit the JS function instead of hard code. This metjod is more integrated.
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
Dim jsf As String = "<Script LANGUAGE=""JavaScript""" & ">" & vbCrLf & "function MyFilterJS()" & vbCrLf & _
"{answer = confirm(""U sure to filter?""); if (answer == ""true"") {return true; } else {return false;}} </" & "Script>"
Dim jse As String = "<Script LANGUAGE=""JavaScript""" & ">" & vbCrLf & "function MyEditJS()" & vbCrLf & _
"{answer = confirm(""U sure to update?""); if (answer == ""true"") {return true; } else {return false;}} </" & "Script>"
Dim J As New Tornado.z
With J
.dbQP = "U=1| D=NWIND| S=8| GDF=0,1,2,3| Ni=b5,search, update| ff=0,1,2| eaf=0,1,2| euf=0,1,2|" & _
"bm=customers;0| TH=title=JS Validate"
.dbFilterValidateName = "MyFilterJS()"
.dbEditValidateName = "MyEditJS()"
.dbSendHead = jse & jsf
.dbSQL = "Select * From customers"
.ASPdbNET()
End With
End Sub
</script>
z Class | Tornado Namespace | dbFilterValidateName | Special Topic - Edit