Tornado API Library - V12.30.08

z.dbEditValidateName Property

User Supplied Javascript function Name for Edit input validation.

Product Version

evn
[VisualBasic]
PublicPropertydbEditValidateNameAsString
[C#]
publicstringdbEditValidateName{set;}

Property Value

Mydb.dbEditValidatename="Javascript Function Name"

QuickProp Keyword Abbreviation

evn

Remarks

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.

Example

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>

See Also

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