formmail.asp giving error in Mozilla
I've been using formmail but only tested it on Avant and IE browser. They both worked great (except I can't get realname to display in the email). The other day I used Mozilla and it gave the following error:
Microsoft VBScript runtime error '800a0009'
Subscript out of range: '[number: 1]'
/scripts/formmail.asp, line 164
part of script:
'----------------------------------------------------------------------------------------------------
'form validation, checks a valid email address has been specified
'----------------------------------------------------------------------------------------------------
if query2(0) = "email" then
trim(query2(0))
if len(query2(1))<8 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
if instr(query2(1),"@")=0 and instr(query2(1),".")=0 then
response.write query2(1)
response.Write("You must specify a valid ") & query2(0)
response.end
end if
strEmail1 = split(query2(1),"@")
if len(strEmail1(1))<3 then (this is line 164)
response.Write("You must specify a valid ") & query2(0)
response.end
end if
strEmail2 = split(strEmail1(1),".")
if len(strEmail2(0))<3 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
if len(strEmail2(1))<2 then
response.Write("You must specify a valid ") & query2(0)
response.end
end if
end if
Any ideas what needs to be rectified?
Thanks,
TOG
|