Yes im having a issue i thought i didn't have.
When you submit it runs a javascript function, that runs an ajax call. This function have this right under it´s name(first line in the function):
$('#submitWall').attr('disabled', true);
This works very well, but not so well for the faster humans...I tried to click/pressing enter really fast, and it inserted to the database 2-3 times.
And I want to prevent this. As i said i have the above, which didn't solve it 100%.
Is there a solution for this in JS/jquery or maybe in PHP, so there's like a 1 second timelimit somehow..?
Here's my function:
function DoWallInsert(BuID, uID){
$('#submitWall').attr('disabled', true);
var wrapperId = '#wall_insert';
$.ajax({
type: "POST",
url: "misc/insertWall.php",
data: {
value: 'y',
BuID : BuID,
uID : uID,
message : $('#message').val()
},
success: function(msg){
$('#submitWall').attr('disabled', false);
$(wrapperId).prepend(msg);
$(wrapperId).children().first().slideDown('slow');
$('#message').val("");
}
});
}