21 Replies Latest reply on Nov 4, 2011 2:55 PM by BenPleysier

    Why doesn't this Spry work?

    greenber2

      as a simple test case, I created a new VBScript/ASP file and in it I created a form with a text field, a Spry confirm text field and another text field for a blur-field. When I smack F12 for a run I get an immediate "fields don't match"-Error before entering even a single character. Source code below. What is wrong?

      ==================================

      <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

      <!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="/SpryAssets/SpryValidationConfirm.js" type="text/javascript"></script>

      <link href="/SpryAssets/SpryValidationConfirm.css" rel="stylesheet" type="text/css" />

      </head>

       

      <body>

      <p> </p>

      <form id="form1" name="form1" method="post" action="">

        <label for="pwd1">pwd1</label>

        <input type="text" name="pwd1" id="pwd1" />

        <span id="spryconfirm1">

        <label for="pwd2">pwd2</label>

        <input type="text" name="pwd2" id="pwd2" />

      <span class="confirmInvalidMsg">The values don't match.</span></span>

        <label for="blur">blur</label>

        <input type="text" name="blur" id="blur" />

      </form>

      <p> </p>

      <script type="text/javascript">

      var spryconfirm1 = new Spry.Widget.ValidationConfirm("spryconfirm1", "pwd1", {isRequired:false, validateOn:["blur"]});

      </script>

      </body>

      </html>

      ==============================