Universal Form Validator ASP Support Product Page
Error when opening universal form validator
Asked 15 Mar 2010 12:28:17
1
has this question
15 Mar 2010 12:28:17 Joël GUERVENOU posted:
Hi,I don't know why when i want to apply fomr validation to my forms i always get this error message:
"Some of your forms do not contain an ID...."
Here my code page:
<%@LANGUAGE="VBSCRIPT"%> <!--#include file="../Connections/sqlfncas.asp" --> < %Dim Recordset1 Dim Recordset1_cmd Dim Recordset1_numRows Set Recordset1_cmd = Server.CreateObject ("ADODB.Command") Recordset1_cmd.ActiveConnection = MM_sqlfncas_STRING Recordset1_cmd.CommandText = "SELECT * FROM dbo.Etablissements" Recordset1_cmd.Prepared = true Set Recordset1 = Recordset1_cmd.Execute Recordset1_numRows = 0 %> < %' *** Validate request to log in to this site. MM_LoginAction = Request.ServerVariables("URL") If Request.QueryString <> "" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString) MM_valUsername = CStr(Request.Form("identifiant")) If MM_valUsername <> "" And Not MM_abortEdit Then Dim MM_fldUserAuthorization Dim MM_redirectLoginSuccess Dim MM_redirectLoginFailed Dim MM_loginSQL Dim MM_rsUser Dim MM_rsUser_cmd MM_fldUserAuthorization = "" MM_redirectLoginSuccess = "accueiletab.Asp" MM_redirectLoginFailed = "etabtfail.asp" MM_loginSQL = "SELECT loginetab, pwdetablissement,idetablist" If MM_fldUserAuthorization <> "" Then MM_loginSQL = MM_loginSQL & "," & MM_fldUserAuthorization MM_loginSQL = MM_loginSQL & " FROM dbo.Etablissements WHERE loginetab = ? AND pwdetablissement = ?" Set MM_rsUser_cmd = Server.CreateObject ("ADODB.Command") MM_rsUser_cmd.ActiveConnection = MM_sqlfncas_STRING MM_rsUser_cmd.CommandText = MM_loginSQL MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param1", 200, 1, 10, MM_valUsername) ' adVarChar MM_rsUser_cmd.Parameters.Append MM_rsUser_cmd.CreateParameter("param2", 200, 1, 50, Request.Form("passw")) ' adVarChar MM_rsUser_cmd.Prepared = true Set MM_rsUser = MM_rsUser_cmd.Execute If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then ' username and password match - this is a valid user Session("MM_Username") = MM_valUsername ' stockage id etablissement pour filtre Session("idetablist") = (MM_rsUser.Fields.Item("idetablist").Value) If (MM_fldUserAuthorization <> "") Then Session("MM_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value) Else Session("MM_UserAuthorization") = "" End If if CStr(Request.QueryString("accessdenied")) <> "" And false Then MM_redirectLoginSuccess = Request.QueryString("accessdenied") End If MM_rsUser.Close Response.Redirect(MM_redirectLoginSuccess) End If MM_rsUser.Close Response.Redirect(MM_redirectLoginFailed) End If %> <!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"><!-- InstanceBegin template="/Templates/INTRA.dwt" codeOutsideHTMLIsLocked="false" --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <!-- InstanceBeginEditable name="doctitle" --> <title>Document sans titre</title> <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="head" --> <link href="../css/cms.css" rel="stylesheet" type="text/css" /> <!-- InstanceEndEditable --> <style type="text/css"> <!-- body { margin-top: 0px; } --> </style> <link href="../css/cms.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .Style5 {color: #FFFFFF; font-weight: bold; } --> </style> </head> <body> <table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><table width="800" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="2"><img src="img/logoFNCAS.jpg" width="397" height="70" /></td> </tr> <tr> <td bgcolor="#003366"> <span class="Style5">ENQUETE FNCAS</span></td> <td bgcolor="#003366"><FORM> <div align="right"> <INPUT type="button" class="form" onClick="history.back()" value="Retour"> </div> </FORM> <div align="right"></div></td> </tr> <tr> <td colspan="2"><!-- InstanceBeginEditable name="CONTENU" --> <p><span class="entetepage"><br /> </span><span class="langTable"><br /> </span><br /> </p> <p class="entetecentrepageblanc">Enquête nationale<br /> Observatoire national de l'environnement social de travail<br /> dans les établissements d'enseignement supérieur français <br /> <br /> <br /> </p> <p class="entetecentrepageblanc"> </p> <p class="entetecentrepagebleu">Accès à la fiche de renseignement <br /> de votre établissement d'enseignement supérieur </p> <p> </p> <p> </p> <p>Merci de vous identifier à l'aide des identifiant et mot de passe qui vous ont été fournis dans le courrier…<br /> <br /> </p> <form id="form1" name="form1" method="POST" action="<%=MM_LoginAction%>"><table width="306" border="0" align="center"> <tr> <td width="149" align="right">identifiant</td> <td width="147"><label> <input type="text" name="identifiant" id="identifiant" /> </label></td> </tr> <tr> <td align="right">mot de passe</td> <td><label> <input type="text" name="passw" id="passw" /> </label></td> </tr> <tr> <td> </td> <td><label> <input name="button" type="submit" class="entetecentrepagebleu" id="button" value="Envoyer" /> </label></td> </tr> </table> </form> <p><br /> </p> <p><br /> <br /> <br /> <br /> <br /> <br /> <br /> <br /> </p> <!-- InstanceEndEditable --><br /> <br /> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="23%" align="center"><img src="img/mesr.jpg" width="137" height="126" /></td> <td width="70%"> </td> <td width="7%" align="center"><img src="img/logo_cpu.jpg" width="142" height="103" /></td> </tr> </table> <br /> <br /></td> </tr> <tr> <td bgcolor="#003366"><span class="Style5">FNCAS </span></td> <td bgcolor="#003366"> </td> </tr> </table></td> </tr> </table> </body> <!-- InstanceEnd --></html> < %Recordset1.Close() Set Recordset1 = Nothing %>
Replies
Replied 15 Mar 2010 12:45:56
15 Mar 2010 12:45:56 George Petrov replied:
Hi Joel,
You have a form tag in your code like this:
<FORM>
Please give it a name and ID attributes and it should be all fine.
Greetings,
George
You have a form tag in your code like this:
<FORM>
Please give it a name and ID attributes and it should be all fine.
Greetings,
George