Hi, I have a checkout page that unobtrusively checks to see whether a customer has ordered from us before.
After they fill in their e-mail address and focus to the next box, I look up the e-mail and present a 'welcome back' type thing with option to remember their details.
I'm getting a problem in IE6 - whenever the focus is lost from the input box, the ajax function runs as normal but focus is returned back to the input box. This means that whenever the customer tries to click away from the e-mail input box, they keep getting returned to it and cannot proceed.
Is there a way of stopping this behaviour?
// check when the e-mail box is changed
$("#email").change(function(event) {
$.ajax({
type: "POST",
url: "procBasketEmailLookup.php",
data: $("#checkoutform").serialize(),
success: function(response) {
$('#emailstuffOutput').hide();
$('#emailstuffOutput').html(response);
$('#emailstuffOutput').show('slow');
}
});
// DON'T ALLOW THE PAGE TO SUBMIT
return false;
});