I am having trouble with the function ShowResponse action on my Ajax Form. I am trying to show a simple message in the #show div once the form has been submitted. The Ajax submission is working okay and I can get an alert to work but I cant get the #show div to display. My code looks like this,
<script type="text/javascript" src="/uploads/JS/jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var options = {
target: '#contact_form_94',
success: showResponse
};
$('#m477famoduleform_2').ajaxForm(options);
});
function showResponse(responseText, statusText, xhr, $form) {
alert('status: ' + statusText + '\n\nresponseText: \n' + responseText +
'\n\nThe output div should have already been updated with the responseText.');
}
</script>
If anyone could help that would be great. As a minimum I would just like to replace the form with a 'Success' message.
Thanks
Chris