- Daedleh
- Aug 25, 2008
-
What shall we do with a catnipped kitty?
|
golgo13sf posted:
sorry, I misunderstood:
Combine it with the other code to do a full verification (email addresses match and are in a valid format)
I actually came here to ask about this very problem as I'm having some trouble with differences between IE & Firefox. This is the code I've got:
code: //Check if the user has entered an email address
var email = document.getElementById('email').value;
if (email.length == 0 ) {
alert('Please enter an e-mail address.');
document.getElementById('email').focus();
return;
}
//And if they've confirmed it
var cemail = document.getElementById('con-email').value;
if (cemail.length == 0 ) {
alert('Please confirm the e-mail address.');
document.getElementById('con-email').focus();
return;
}
//And check that the email and confirmation match.
if (cemail != email) {
alert('The e-mail addresses provided do not match.');
document.getElementById('con-email').focus();
return;
}
Now I can't see any differences in the relevant code between my final check and what you've put but while the code works fine in Firefox, in IE8 (windows 7 so I don't have the others to hand) it always gets a mismatch.
The page I'm trying to get it working on is here (yeah go ahead and mess about if you want. It will send out an e-mail with a random password but there's nowhere to login yet):
http://nickjwilliams.co.uk/cms/l-administrators.php
|
#
¿
Oct 11, 2009 23:13
|
|
- Adbot
-
ADBOT LOVES YOU
|
|
#
¿
May 4, 2024 00:33
|
|