need to be solved: ajax post is too fassst.... and the page redirected.
Waah, wah, wah... I never realized that once I just putting in the jquery into my interfaces (jsp), it's going faster than ever...!
I actually wanted to animate abit the button to be fadeOut
once the button Login is pressed because i put that button inside of a form, I mean html form.
But here, seems that the button fadeOut not completely, and it gets the response from the Ajax Post too fast... and it's redirected into another page (which is for this case; Go To
Home)
which in turns,
I couldn't get the animation to be seen.
But anyway which portion that I forgot here?
Can I slow down the performance or something? Hmmm....
$('#login-form').ajaxForm({
beforeSubmit: function(){
var emptyString = '- none -';
// no checking
// but we change the progress
$('#status').fadeOut(1000);
return true;
},
success: function(data) {
// we validate the status returned first
// show result accordingly
// 0 is failed
// 1 is success
if(data==1){
window.location = "home";
} else {
$('#forgot').html('Forgot Password');
$('#status').fadeIn(1000);
}
}
});