Hi guys
I was wondering whether someone could help me with a slight issue I have. I'm trying to set up a quick poll using AJAX which all works fine when using Firefox but running into issues via IE.
$(function() {
$('.error').hide();
$(".button").click(function() {
var userid = $("input#userid").val();
var name = $('input[name=name]:checked').val();
var dataString = 'name='+ name + '&userid=' + userid;
$.ajax({
type: "POST",
url: "poll/process.php",
data: dataString,
success: function() {
$('#weekly_poll').html("<div id='message'></div>");
$('#message').html("<h2>Thanks for your vote!</h2>")
.hide()
.fadeIn(500, function() {
$('#message');
});
}
});
return false;
});
});
The issue I'm having is that although the form is being processed OK with data being captured in the database, once the form is submitted, the above script just seems to stop the rest of the page from loading. This only happens on IE and it must be something to do with the success function but as I'm new to JavaScript I don't know what I'm doing wrong.
Can anyway help me please? I think it's something really simple and I'm just being stupid.
Many thanks for reading.