Hey guys,
Ive got an issue here with a site that Im working on. Im receiving several emails a day from members complaining that they “cant login”
Upon troubleshooting, its become apparent that this issue is definitely related to Firefox. In particular FF 4.0.1
Put simply, the request objects are being “lost” when posted from the form to the next page. Ive read on other forums that for some reason, FF may ignore the POST command and instead, use GET. I have absolutely no idea why, but I need to get to the bottom of this.
I have debugged and found that the form objects “email” and “password” are completely blank (lost) and not being passed to the SQL script on the following page which validates login.
Heres the code…(including the Javascript checklogin script)
<SCRIPT LANGUAGE=“JavaScript”>
//CARRY OUT FORM VALIDATION
function checklogin() {
if (document.login.login_email.value == “”) {
alert(“You must enter your email address.”);
return false; }
var result
var str=document.login.login_email.value
var filter=/^.+@.+\\..{2,3}$/
if (filter.test(str))
result=true
else {
alert("You must enter a valid email address")
result=false
return false; }
if (document.login.login_password.value == "") {
alert("You must enter your password.");
return false; }
}
</script>
<form name=“login” method=“post” action=“/members/members_verifylogin.asp” style=“margin:0px” onSubmit=“return checklogin()”>
<input class="textarea"form type=“text” name=“login_email” size=“20”>
<input class="textarea"form type=“password” name=“login_password” size=“20”>
<input class=sbttnorange type=“submit” name=“login” value=“LOGIN”>
</form>
Then on the following page I have…
email = trim(Replace(request.form(“login_email”), “'”, “”))
password = trim(Replace(request.form(“login_password”), “'”, “”))
What I do know for certain is that both values are empty and arent being passed.
What I dont know, is if there is an issue with my Javascript code that may be causing this issue. Unlike IE, when you dont enter anything into the text fields, FF simply submits the form and the javascript fails to work.
IE prompts with the correct message.
Again this works fine in IE, just not in FF.
Help!