Tornado API Library - V12.30.08

z.dbEditValidateName Property

User Supplied Javascript function Name for Edit input validation.

Product Version


Property Value

Mydb.dbEditValidatename="Javascript Function Name"

QuickProp Keyword Abbreviation



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.

  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"
  End With
End Sub

See Also

z Class | Tornado Namespace | dbFilterValidateName | Special Topic - Edit