Bugfixing

svn path=/trunk/; revision=24126
This commit is contained in:
otto 2012-08-30 08:15:16 +00:00
parent 776e478344
commit 04d64cf0a7
1 changed files with 20 additions and 0 deletions

View File

@ -325,6 +325,26 @@ $(document).ready(function() {
}
});
});
/* attach a submit handler to the form */
$("form.support").submit(function(event) {
/* stop form from submitting normally */
event.preventDefault();
/* cannot use this directly as it is an HTMLFormElement */
var $form = $(this);
var $submitbutton = $("form.support input[type='submit']");
$submitbutton.val($submitbutton.attr="data-loading-text")
/* Send the data using post and put the results in a div */
$.post($form.attr("action"), $form.serialize(),
function(data) {
$("#support_form").fadeOut();
$("#introduction").append('<div id="support_form_sent">'+data+'</div');
}
);
});
/* ]]> */
</script>
</div>