Author |
Topic |
|
Snake.Xenzia
Starting Member
Italy
2 Posts |
Posted - 15 May 2009 : 18:20:24
|
Hi, Excuse me for my english. http://forum.snitz.com/forum/register.asp?mode=Register if in Registration Form for Snitz Forums 2000 Contact Info E-mail Address: writing without the @ (ex/ aaa) appears that error message
Microsoft VBScript runtime error '800a0005' Invalid procedure call or argument: 'Mid' /forum/register.asp, line 413
Why this? Is there solution? Thanks and regards
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 May 2009 : 03:08:42
|
firstly it is because email addresses must contain an @ so your or someone entered an invalide email, however this should be trapped by the code, however the addition of some antispam spam code as broken the eror trap.
I will review the code and post a fix later. |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 16 May 2009 : 03:16:28
|
here is the fix.
in register.asp, replace this section of code
with this
|
|
|
Snake.Xenzia
Starting Member
Italy
2 Posts |
Posted - 16 May 2009 : 18:21:38
|
Yes, thanks, I understand. I Shall make the change.
But even in this forum is the error. Thanks and regards. |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 17 May 2009 : 02:43:49
|
quote: Originally posted by Snake.Xenzia But even in this forum is the error. Thanks and regards.
Yes, I know, the error is in the base code, I did not imply that it was only you who was affected. |
|
|
modifichicci
Average Member
Italy
787 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 17 May 2009 : 04:12:25
|
quote: Originally posted by modifichicci
but the input of email isn't checked from the function EmailField ? Why if EmailField(Request.Form("Email")) = 0 then doesn't work?
yes it does, emailfield checks to ensure the email address is of the correct format.
The error reported was caused by the antispam code trying to parse split the email on the @ symbol without ensuring there was actually an @ in the address and was nothing to do with the EmailField function |
|
|
modifichicci
Average Member
Italy
787 Posts |
|
modifichicci
Average Member
Italy
787 Posts |
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 17 May 2009 : 07:29:51
|
quote: Originally posted by modifichicci
but an email without a @ isn't a correct format, or not? that function doesn't assure a @ in the address?
yes it does, I suggest you look at the function |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 17 May 2009 : 07:31:01
|
quote: Originally posted by modifichicci
it is not why the check on Emailfield in original is after the spam routine and not before?
moving it (as you have done) the if before the spam routine could be if EmailField(Request.Form("Email")) <> 0 then
it works on my forum
it doesn't matter where the check is, what I posted fixes the error and works fine. there is no point in calling the function twice which is what you are suggesting.
The fix which stops the error is nothing to do with that function it is the if(Instr(Request.Form("Email"),"@")) which stops the error occuring |
|
|
|
Topic |
|