JS Validate

CustomerIDCompanyNameContactNameContactTitle
ALFKI Alfreds Futterkiste Maria Anders Sales Representative
ANATR Ana Trujillo Emparedados y helados Ana Trujillo Owner
ANTON Antonio Moreno Taquería Antonio Moreno Owner
AROUT Around the Horn Thomas Hardy Sales Representative
BERGS Berglunds snabbköp Christina Berglund Order Administrator

bottom next goreload Popup Filter goupdate

[1 - 5 : 91]

JS Validation -  Filter & Edit
<script language="VB" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
  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>

Javascript validation is the same for Edit and Filter.

Send comments on this topic.
Copyright (c) 1998-2006 ASP-db