Submit form only once Problem
I'm having a problem getting the form to submit only once when the user clicks on it.
The first time they submit the form it is fine.
Second / x amount time they submit it submits more then once. I did use the .one method which now limits it to submitting the form only twice.
-
$j('#activateForm').click(function(){
$j('#showForm').fadeIn();
$j('.submitForm').one("click", function(){
$j.ajax({
type: "POST",
url: "http://www.example.com",
data: "name="+$j('#name').val(),
cache: false,
dataType: "json",
success: function(data){
// display message
}
});
return false;
});
});
Thanks in advance,
Corey