I have a login page which works perfectly in Firefox,but it is not working in Internet explorer on the server.The form is not submitted.Also,I'm using niceform template.What could be the problem? My form code
<form action="myurl"
method="post" class="niceform">
<fieldset>
<dl>
<dt>
<label for="email"> Username:</label>
</dt>
<dd>
<input type="text" name="username" value="" id="username" size="54" />
<font color="red"></font>
</dd>
</dl>
<dl>
<dt>
<label for="password"> Password:</label>
</dt>
<dd>
<input type="password" name="password" value="" id="password" size="54" />
<font color="red" > </font>
</dd>
</dl>
<dl>
<dt>
<label for="password"> Login As:</label>
</dt>
<dd>
<select name="user_type">
<option value="user"> User </option>
</select>
<font color="red">
<span id="login_err" style="display: none;"> username or password can not be left blank.</span><br />
</font>
</dd>
</dl>
<dl class="submit" style="text-align: right;">
<p style="padding-left: 91px; float: right; padding-right: 59px; width: 128px; font-weight: bold;">
</p>
<input type="submit" name="submit" id="submit" value="Enter" />
</dl>
</fieldset>
</form>
My Script
<script type="text/javascript">
$(document).ready(function(){
$('#submit').click(function(){
var username = $.trim($('#username').val());
var password = $.trim($('#username').val());
if(username== ''||username == null|| password=='' || password == null ){
$('#login_err').show();
return false;
}else{
return true;
}
});
});
</script>
Sorry guys it wasn't the issue of submit.The page was redirected in the serverside code giving it an illusion that the form was never submitted.
The issue was with internet explorer catching.There was some issue with naming convention of the cookie and it was not storing the user data in the session and therefore the user was redirected to the same page.