Universal Form Validator ASP Support Product Page

Please check the code and see why Validator dose not work

Asked 26 Apr 2014 00:28:33
1
has this question
26 Apr 2014 00:28:33 Mr. em posted:
When submitting the page the Validator is ignored and the page continue to the redirect page witch is done.asp and empty fields are added to the database, see if you can find looking at source code below why is it happening, am i missing something? Please help me I need to solver this, thanks

<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")
If (Request.QueryString <> "" Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' Universal Form Validator ASP 1.5.6
dim dmxval1, DMX_validateAction
set dmxval1 = new dmxValidator
dmxval1.ScriptFolder = "ScriptLibrary"
dmxval1.CSValidateOnChange = true
dmxval1.CSValidateOnSubmit = true
dmxval1.ReenableJavascript = true
dmxval1.UseBotCheck = true
dmxval1.ReportType = 4
dmxval1.ErrorFont = "Arial"
dmxval1.ErrorFontSize = 12
dmxval1.ErrorColor = "#ffffff"
dmxval1.ErrorBgColor = "#ff0000"
dmxval1.ErrorBold = true
dmxval1.ErrorItalic = false
dmxval1.ErrorImage = ""
dmxval1.ErrorFixed = "Custom"
dmxval1.ErrorPadding = 4
dmxval1.BorderColor = "#FF0000"
dmxval1.CssErrorFile = "validatorError1"
dmxval1.ErrorPreset = "error_five.txt"
dmxval1.TooltipPosition = "top"
dmxval1.CssHintFile = "validatorHint1"
dmxval1.HintPreset = "blue.txt"
dmxval1.HintTooltipPosition = "top"
dmxval1.HintBorderColor = "#0099ff"
dmxval1.HintBorderStyle = "solid"
dmxval1.HintBgColor = "#003399"
dmxval1.HintTextColor = "#ffffff"
dmxval1.HintTextFont = "Arial"
dmxval1.HintTextSize = 12
dmxval1.HintTextBold = false
dmxval1.HintTextItalic = false
dmxval1.HintBoxWidth = 200
dmxval1.HintImage = ""
dmxval1.HintFixed = "Custom"
dmxval1.HintPadding = 4
dmxval1.UseCustomFocusClass = "fixed"
dmxval1.FocusBorderStyle = "groove"
dmxval1.FocusBorderSize = 2
dmxval1.FocusBorderColor = "#C3D9FF"
dmxval1.FocusBgColor = "#FFFFFF"
dmxval1.FocusTextColor = "#000000"
dmxval1.UseCustomValidClass = "fixed"
dmxval1.ValidBorderStyle = "groove"
dmxval1.ValidBorderSize = 2
dmxval1.ValidBorderColor = "#00FF00"
dmxval1.ValidBgColor = "#FFFFFF"
dmxval1.ValidTextColor = "#000000"
dmxval1.UseCustomInvalidClass = "fixed"
dmxval1.InvalidBorderStyle = "groove"
dmxval1.InvalidBorderSize = 2
dmxval1.InvalidBorderColor = "#FF0000"
dmxval1.InvalidBgColor = "#FFFFFF"
dmxval1.InvalidTextColor = "#000000"
dmxval1.AddRule "form1", "FirstName", "allformats", ",,", "true", "", "", "", ""
dmxval1.AddRule "form1", "Email", "ajaxexistscond", "validatorAjax/dmxValidatorAjax1.asp,,", "true", "", "", "", ""
dmxval1.Validate
%>
<%
' WA Application Builder Insert
if (Request.ServerVariables("Request_Method" = "POST" then
WA_connection = MM_conJBDLocal_STRING
WA_table = "dbo.Customers"
WA_sessionName = "Customers_CustomerID"
WA_redirectURL = "done.asp"
WA_keepQueryString = false
WA_indexField = "CustomerID"
WA_fieldNamesStr = "FirstName|CustomerEmail"
WA_fieldValuesStr = "" & cStr(cStr(Request.Form("FirstName")) & "" & "|" & "" & cStr(cStr(Request.Form("Email")) & ""
WA_columnTypesStr = "',none,''|',none,''"
WA_comparisonStr = " LIKE | LIKE "
WA_fieldNames = Split(WA_fieldNamesStr,"|"
WA_fieldValues = Split(WA_fieldValuesStr,"|"
WA_columns = Split(WA_columnTypesStr,"|"
WA_comparisions = Split(WA_comparisonStr, "|"

insertParamsObj = WA_AB_generateInsertParams(WA_fieldNames, WA_columns, WA_fieldValues, -1)
set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = WA_connection
MM_editCmd.CommandText = "INSERT INTO " & WA_table & " (" & insertParamsObj(1) & " VALUES (" & insertParamsObj(2) & ""
MM_editCmd.Execute()
MM_editCmd.ActiveConnection.Close()
obj = WA_AB_generateWhereClause(WA_fieldNames, WA_columns, WA_fieldValues, WA_comparisions)
sqlstr = "SELECT " & WA_indexField & " FROM " & WA_table & " WHERE " & obj & " ORDER BY " & WA_indexField & " DESC"
set WA_AppBuilderRecordset = Server.CreateObject("ADODB.Recordset"
WA_AppBuilderRecordset.ActiveConnection = WA_connection
WA_AppBuilderRecordset.Source = sqlstr
WA_AppBuilderRecordset.CursorType = 0
WA_AppBuilderRecordset.CursorLocation = 2
WA_AppBuilderRecordset.LockType = 1
WA_AppBuilderRecordset.Open()
if (NOT WA_AppBuilderRecordset.EOF) then Session(WA_sessionName) = WA_AppBuilderRecordset.Fields.Item(WA_indexField).Value
WA_AppBuilderRecordset.Close()
if (WA_redirectURL <> "" then
if (WA_keepQueryString AND Request.QueryString <> "" AND Request.QueryString.Count > 0) then
if (inStr(WA_redirectURL,"?" > 0) then
WA_redirectURL = WA_redirectURL & "&"
else
WA_redirectURL = WA_redirectURL & "?"
end if
WA_redirectURL = WA_redirectURL & Request.QueryString
end if
Response.Redirect(WA_redirectURL)
end if
end if
%>
-------------------------------------end----------------------------------------
ScriptLibrary | validatorAjax | Styles
all associated files were uploaded to the server and the extension is up-todate

Reply to this topic