[jQuery] jquery ajax not working on firefox 2
Hi,
I'm using jquery ajax for a part of my site and it works on firefox 3,
ie 6, ie 7 and safari, but not firefox 2. Anyone come across this
before? Here's the ajax function
checkUsernameAvailability: function(i) {
// var sBaseName = 'user_name';
var sBaseName = i.split("reg_")[1];
var sValue = $('#reg_'+sBaseName).val();
if (4 < sValue.length && sValue.length < 16) {
$.ajax({
url: usernameAjax,
type: 'POST',
data: 'testUsername='+sValue,
dataType: 'xml',
error: function(){
// alert('Error in checking username availability.');
oRequired[i]= 0;
},
success: function(xml){
$(xml).find('exists').each(function(){
var exists = $(this).text();
if (exists == 'true') {
showHelp('error_user_name');
setTimeout('hideHelp(\'error_user_name\')',3000);
swapFlag(sBaseName,'nonvalid');
oRequired[i]=0;
} else {
checkAgainstBlacklist(i);
}
});
}
});
}
},
on firefox 2, it gets into error: function() and alerts me when that
alert line is uncommented.
any ideas?
Thanks