I am using the form plugin to post my form. Everything works fine until I try and load an external page. See here:
<script type="text/javascript">
$(document).ready(function() {
//shows loading screen whilst posting via ajax
$().ajaxStart($.blockUI).ajaxStop($.unblockUI);
var options = {
target: '#alert',
};
// bind form using 'ajaxForm'
$('#add_customer').ajaxForm(options);
//load form.php
$('#theform').hide().load('form.php', function() {
$(this).fadeIn();
});
});
</script>
Now Loading the page works correctly but the ajax for the form post doesn't.