User must enter email twice during registration

Started by Ride, August 25, 2004, 01:14:37 PM

Previous topic - Next topic

xjessie007

You are getting parse errors because there is a little omission in Sleepy's code. The code as he posted it here perhaps may have worked in his version and config, but I am getting parse error in 1.1.6 too. So, here is how to fix it.

a) There needs to be a semicolon after }.
b) Watch out for the tick at the end of the code. The tick at the end of the code is just the closing tick for the echo statement.

   echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
   function verifyAgree()
   {
      if (document.forms.creator.passwrd1.value != document.forms.creator.passwrd2.value)
      {
         alert("', $txt['register_passwords_differ_js'], '");
         return false;
      };

      if (document.forms.creator.passwrd1.value != document.forms.creator.passwrd2.value && document.forms.creator.email.value != document.forms.creator.email2.value)
      {
         alert("The e-mail addresses you have entered to NOT match. The passwords You have entered do not match. Please check them again to make sure they are correct.");
         return false;
      };

      if (document.forms.creator.email.value != document.forms.creator.email2.value)
      {
         alert("The e-mail address you have entered are NOT the same. Please check them to make sure they are correct");
         return false;
      }';


In case you are getting parse errors when implementing this functionality, check the red code in your code. SleePy's code is missing the semicolons.

By the way, there is a module called EmailValidator. This mod nicely comliments this functionality. Check it out here: http://custom.simplemachines.org/mods/index.php?mod=1353

-------------
www.maxi-pedia.com - Maxi-Pedia: Your resource for finance & IT!
www.finance-management.cz - Central European Center for Finance and Management
When traveling to the Schengen zone (most of Europe), remember that some nationals need so called Schengen visa. Schengen visa is a travel document.
Check the schengen visa travel guide

kbarg


kirderf


Do anyone know how to force users to must enter birthdate and location during registration ?

Oldiesmann

Michael Eshom
Christian Metal Fans

unformatted_


raghhav


Oldiesmann

Michael Eshom
Christian Metal Fans


kizer

Own a Jeep? Links4Jeeps.com

Advertisement: