Hi,
I have built a simple login form via ajax (jquery), but the submitted values (the users email address for login purpose, not the password) are not stored. So the second time the user tries to login he has to write his full email address instead of using the stored email address.
Is this normal with ajax form submission and (more important) is there a ajax/jquery solution, so that the browser "remembers" the submitted value?
if($(this).attr('href')=="#login")
{
$.ajax({
type: "POST",
url: "http://www.xyz.com/register",
data:({
email : $('#email').val(),
password: $('#password').val()
}),
success: function(result)
{
if(result=='ok')
{
window.location = 'http://www.xyz.com/123';
}
else
{
$('#result').empty().addClass('error')
.append('Something is wrong.');
}
}
});
return false;
}