Forums
This topic is locked
Universal Form Validator - Form Action
Posted 22 Jun 2009 15:10:06
1
has voted
22 Jun 2009 15:10:06 Gareth Tannatt Nash posted:
Hi Guys, not too sure whether this is the right place to ask for help, but I've just bought your universal form validator, which looks great, however I've tried adding it to one of my pages (a test page) and have tried both incorrect and correct data, however a small issues that I can't seem to get around -The forms action was set to /index.asp prior to adding the extensions, now it is set to <%=DMX_validateAction%> and I can't for the life of me see where this calls the pafge to redirect to, the end result being that either the form is being posted, or it's redirecting to itself?
the page in question is here - techjobsscotland.co.uk/test.asp
my test code is -
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <!--#include file="ScriptLibrary/dmxValidator.asp" --> < %' Universal Form Validator ASP 1.0.0 dim dmxval1, DMX_validateAction set dmxval1 = new dmxValidator dmxval1.ScriptFolder = "ScriptLibrary" dmxval1.CSValidateOnChange = true dmxval1.CSValidateOnSubmit = true dmxval1.ReportType = 0 dmxval1.ErrorFont = "Arial" dmxval1.ErrorFontSize = 12 dmxval1.ErrorColor = "#000000" dmxval1.ErrorBold = false dmxval1.ErrorItalic = false dmxval1.ErrorImage = "" dmxval1.UseCustomHintCss = "fixed" dmxval1.HintBorderColor = "#000000" dmxval1.HintBorderSize = 1 dmxval1.HintBorderStyle = "solid" dmxval1.HintBgColor = "#FFFF88" dmxval1.HintTextColor = "#008C00" dmxval1.HintTextFont = "Arial" dmxval1.HintTextSize = 12 dmxval1.HintTextBold = false dmxval1.HintTextItalic = false dmxval1.HintBoxWidth = 200 dmxval1.UseCustomFocusClass = "fixed" dmxval1.FocusBorderStyle = "groove" dmxval1.FocusBorderSize = 1 dmxval1.FocusBorderColor = "#990033" dmxval1.FocusBgColor = "#FFFFFF" dmxval1.FocusTextColor = "#000000" dmxval1.UseCustomValidClass = "fixed" dmxval1.ValidBorderStyle = "groove" dmxval1.ValidBorderSize = 1 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", "name", "minlengthcond", "8,,", "true", "required", "", "", "" dmxval1.AddRule "form1", "email", "emailcond", ",,", "true", "required", "", "", "" dmxval1.AddRule "form1", "number", "numbercond", ",,", "true", "required", "", "", "" dmxval1.AddRule "form1", "required", "urlcond", ",selector,y", "true", "required", "", "1", "required" dmxval1.AddHint "form1", "name", "Please Enter Your Name" dmxval1.AddHint "form1", "email", "your email" dmxval1.Validate %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <script src="ScriptLibrary/jquery.min.js" type="text/javascript"></script> <script src="ScriptLibrary/jquery.inputHintBox.js" type="text/javascript"></script> <script src="ScriptLibrary/jquery.maskedinput-1.2.2.js" type="text/javascript"></script> <script src="ScriptLibrary/jquery.validate.min.js" type="text/javascript"></script> <script src="ScriptLibrary/dmx.jquery.validate.js" type="text/javascript"></script> <% ' dmxValidatorJSStart dmxval1.GenerateJavascriptAndCss ' dmxValidatorJSEnd %> </head> <body> <form id="form1" name="form1" method="post" action="<%=DMX_validateAction%>"> <ul> <li>Name <label> <input name="name" type="text" id="name" value="<%= dmxSetValue("", Request.form("name")) %>" /> <% dmxval1.GenerateError "form1","name","minlengthcond","8,," %> </label> </li> <li>Email <label> <input name="email" type="text" id="email" value="<%= dmxSetValue("", Request.form("email")) %>" /> <% dmxval1.GenerateError "form1","email","emailcond",",," %> </label> </li> <li>Number <label> <input name="number" type="text" id="number" value="<%= dmxSetValue("", Request.form("number")) %>" /> <% dmxval1.GenerateError "form1","number","numbercond",",," %> </label> </li> <li> <label> </label> Selector <label> <select name="selector" id="selector"> <option value="y">y</option> <option value="n">n</option> </select> </label> </li> <li>Required <label> <input name="required" type="text" id="required" value="<%= dmxSetValue("", Request.form("required")) %>" /> <% dmxval1.GenerateError "form1","required","urlcond",",selector,y" %> </label> </li> <li> <label> <input type="submit" name="but" id="but" value="Submit" /> </label> </li> </ul> </form> </body> </html>
Your help will be appreciated - thanks