Ask a Question related to Macromedia ColdFusion, Design and Development.

  1. #1

    Default password validation

    Hi all, I have a question. I am working on a form that will register users with
    ID and password. I need to validate the password such as the password needs to
    be 8 characters, 1 number, 1 letter, and 1 non alpha numeric characters. Any
    suggestions on how to validate like this. Thanks so much

    talamenne Guest

  2. Similar Questions and Discussions

    1. CFFORM validation trumping Custom Validation
      Is there any way for custom form validation to work in concert with the cfform validation? I have a custom script that compares the values of two...
    2. CFFORM Validation trumping Custom Form Validation
      Is there any way for custom form validation to work in concert with the cfform validation? I have a custom script that compares the values of two...
    3. cfform password validation
      I'm trying to get a standard password / repeat passord validation to work in a Flash form. I assume I need to use javascript validation but do I...
    4. validation summary doesnt display when there's client-side validation
      I have a custom validator that validates a numeric field, txtField, that allows for thousand separators. I also placed a validation summary so...
    5. only custom validation control does server side validation?
      On a CustomValidator you have to provide the validation code because otherwise it doesn't know what to do for the validation. Other validator...
  3. #2

    Default Password Validation

    Hi all,

    I'm building an ASP JS page, which will change a user's password, however
    prior to doing this i need it to verify that the password is correct (against a
    second password field) and then update the record on the server - needless to
    say (i'm stuck :-( )
    I've attached the code (i'd be really grateful if you could help) thanks



    <%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>
    <!--#include file="Connections/recruta.asp" -->
    <%
    var accessright__MMColParam = "0";
    if (String(Session("EMPLOYEEID")) != "undefined" &&
    String(Session("EMPLOYEEID")) != "") {
    accessright__MMColParam = String(Session("EMPLOYEEID"));
    }
    %>
    <%
    var accessright__MMColParam1 = "0";
    if (String(Session("EMPLOYERID")) != "undefined" &&
    String(Session("EMPLOYERID")) != "") {
    accessright__MMColParam1 = String(Session("EMPLOYERID"));
    }
    %>
    <%
    var accessright = Server.CreateObject("ADODB.Recordset");
    accessright.ActiveConnection = MM_recruta_STRING;
    accessright.Source = "SELECT EmplyeeID, EmployerID FROM dbo.Employee WHERE
    EmplyeeID = '"+ accessright__MMColParam.replace(/'/g, "''") + "' AND
    EmployerID = '"+ accessright__MMColParam1.replace(/'/g, "''") + "'";
    accessright.CursorType = 0;
    accessright.CursorLocation = 2;
    accessright.LockType = 1;
    accessright.Open();
    var accessright_numRows = 0;
    %>
    <%
    var ADMINACCESS__MMColParam = "0";
    if (String(Session("EMPLOYEEID")) != "undefined" &&
    String(Session("EMPLOYEEID")) != "") {
    ADMINACCESS__MMColParam = String(Session("EMPLOYEEID"));
    }
    %>
    <%
    var ADMINACCESS = Server.CreateObject("ADODB.Recordset");
    ADMINACCESS.ActiveConnection = MM_recruta_STRING;
    ADMINACCESS.Source = "SELECT EmplyeeID, EmployeeLevel FROM dbo.Employee
    WHERE EmplyeeID = '"+ ADMINACCESS__MMColParam.replace(/'/g, "''") + "' AND
    EmployeeLevel = 'admin'";
    ADMINACCESS.CursorType = 0;
    ADMINACCESS.CursorLocation = 2;
    ADMINACCESS.LockType = 1;
    ADMINACCESS.Open();
    var ADMINACCESS_numRows = 0;
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>New Password</title>
    <style type="text/css">
    <!--
    @import url("textstylesheet.css");
    .style7 {font-size: 10px; font-weight: bold; }
    .style2 {font-size: 10px;
    font-style: italic;
    color: #666666;
    }
    .style8 { font-size: 10px;
    color: #333333;
    }
    .style9 {
    font-size: 16px;
    font-weight: bold;
    }
    -->
    </style>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_swapImgRestore() { //v3.0
    var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
    x.src=x.oSrc;
    }

    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length;
    i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.01
    var p,i,x; if(!d) d=document;
    if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
    if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
    x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++)
    x=MM_findObj(n,d.layers[i].document);
    if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
    for(i=0;i<(a.length-2);i+=3)
    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
    x.oSrc=x.src; x.src=a[i+2];}
    }
    //-->
    </script>
    <meta http-equiv="refresh" content="630;URL=relogin.asp">
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) { //reloads the window if Nav4 resized
    if (init==true) with (navigator) {if
    ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight;
    onresize=MM_reloadPage; }}
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)
    location.reload();
    }
    MM_reloadPage(true);
    //-->
    </script>
    </head>

    <body
    onLoad="MM_preloadImages('Images/useradmin2.jpg','Images/postajob2.jpg','Images/
    logout2.jpg')">
    <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"
    class="textstyle">
    <% if (!accessright.EOF || !accessright.BOF) { %>
    <tr>
    <td height="68" bgcolor="#CCCCCC"><div align="center">
    <table width="600" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="204"><a href="clientindex.asp"><img
    src="Images/logo.jpg" alt="" name="Logo" width="204" height="68"
    border="0"></a></td>
    <td width="15"><img src="Images/greyspacer2.jpg" width="15"
    height="15"></td>
    <td width="381"><table width="381" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td width="8"><img src="Images/greyspacer.jpg" width="8"
    height="8"></td>
    <td><table width="365" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td><img src="Images/greyspacer.jpg" width="8"
    height="8"></td>
    </tr>
    <tr>
    <td><table width="365" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td width="267"><div align="right"
    class="style7"><%= Session("EMPLOYEENAME") %></div></td>
    <td width="8"><img src="Images/greyspacer.jpg"
    width="8" height="8"></td>
    <td width="90"><span class="style7">you are
    logged in </span></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><img src="Images/greyspacer.jpg" width="8"
    height="8"></td>
    </tr>
    <tr>
    <td><table width="365" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td width="85"><div align="right">
    <% if (!ADMINACCESS.EOF || !ADMINACCESS.BOF)
    { %>
    <table width="85" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td><a href="administration.asp"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('administration','','Ima ges/useradmin2.jpg',1)"><img
    src="Images/useradmin.jpg" alt="User Administration" name="administration"
    width="85" height="18" border="0"></a></td>
    </tr>
    </table>
    <% } // end !ADMINACCESS.EOF ||
    !ADMINACCESS.BOF %>
    </div></td>
    <td width="8"><img src="Images/greyspacer.jpg"
    width="8" height="8"></td>
    <td width="85"><div align="right">
    <table width="85" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td><a href="newvacancy.asp"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('postajob','','Images/postajob2.jpg',1)"><img
    src="Images/postajob.jpg" alt="Post a Vacancy" name="postajob" width="85"
    height="18" border="0"></a></td>
    </tr>
    </table>
    </div></td>
    <td width="8"><img src="Images/greyspacer.jpg"
    width="8" height="8"></td>
    <td width="85"><div align="right">
    </div></td>
    <td width="8"><img src="Images/greyspacer.jpg"
    width="8" height="8"></td>
    <td width="85"><div align="right">
    <table width="85" border="0" cellspacing="0"
    cellpadding="0">
    <tr>
    <td><a href="logout.asp"
    onMouseOut="MM_swapImgRestore()"
    onMouseOver="MM_swapImage('logout','','Images/logout2.jpg',1)"><img
    src="Images/logout.jpg" alt="log out" name="logout" width="85" height="18"
    border="0"></a></td>
    </tr>
    </table>
    </div></td>
    </tr>
    </table></td>
    </tr>
    </table></td>
    <td width="8"><img src="Images/greyspacer.jpg" width="8"
    height="8"></td>
    </tr>
    <tr>
    <td width="8"><img src="Images/greyspacer.jpg" width="8"
    height="8"></td>
    <td><img src="Images/greyspacer.jpg" width="8"
    height="8"></td>
    <td width="8"><img src="Images/greyspacer.jpg" width="8"
    height="8"></td>
    </tr>
    </table></td>
    </tr>
    </table>
    </div></td>
    </tr>
    <tr>
    <td height="8"><div align="center"><img src="Images/spacer1.jpg" width="8"
    height="8"></div></td>
    </tr>
    <tr>
    <td valign="top"><div align="center">
    <table width="610" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="5"><img src="Images/spacer1.jpg" width="5"
    height="450"></td>
    <td width="600" align="center" valign="top"><table width="100%"
    border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td><div align="left"><span class="style9">Change Password
    </span></div></td>
    </tr>
    <tr>

    GTN1707 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139