View Single Post
  #1 (permalink)  
Old July 31st, 2006, 04:12 PM
Ov1 Ov1 is offline
Registered User
 
Join Date: Jul 2006
Location: , , Mauritius.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Why does this work in Firefox but not in IE????

Hi there. Can someone shed some light into this?
I'm using a CSS button for a login page. When i press enter on the input field my form is submitted but when i click on the button nothing happens. However, if i use Firefox, both pressing enter and clicking the button submits the form. How can i amend my code so that it works in IE also?
Any1?

Code:
 <form name="login" action="asp/check_login.asp" method="post">
bla bla bla
<td align="left"><a href="javascript:void(0);" class="TextButt" onClick="valogin();">Log in</a>
The javascript function valogin is :
Code:
function valogin ()
{
var error=0;

if (isBlank(document.frmlogin.User.value))
{
    error++;
}

if (isBlank(document.frmlogin.Pass.value))
{
    error++;
}

if (error==0)
{
    document.frmadminlogin.submit();
}
}
Regards,
Ov1
Reply With Quote