lo again,
another different piece of code is bugging me again... o_O
just can't seem to find the problem :/
Code:
function verify_msnm() {
var eml = new String();
eml = document.frm_racc.racc_msnm.value;
eml = eml.toLowerCase;
var x = new String();
x = ' /\\:;?£$%^&*(){}[]~""\',#`|`¦';
var c = new String();
if (eml == '') {
if (!confirm('No MSN Messenger handle! Continue?')) {
return false;
} else {
return true;
}
}
for (var i = 0; i < x.length; i++) {
c = x.charAt(i);
if (eml.indexOf(c,0) != -1) { \\ This line is giving me uphill :/
alert('Invalid MSN Messenger handle...\n""' + c + '"" detected...');
return false;
}
}
var atPos = eml.indexOf('@',1);
if (atPos == -1) {
alert("Invalid MSN user!");
return false;
}
if (eml.indexOf('@',atPos+1) != -1) {
alert('Double @ character detected!\nInvalid MSN Messenger handle...');
return false;
}
var dotPos = eml.indexOf('.',atPos);
if (dotPos <= 0 || dotPos + 3 > email.length) {
alert('Incorrect server syntax.\nInvalid MSN Messenger handle...');
return false;
}
return true;
}
once again, a swift reply would be greatly appreciated...
Sincerely,
Pierre du Toit.
__________________
Sincerely,
Pierre "Greywacke" du Toit
[email protected]
don't worry about my 0 thankyou's either way, i would say thank you should you help, and i will gladly help others when this work rush is over.