Here is the fiddle . A simple form of presentation. It works in IE 7, 8 and 9. The thread goes into the error function because test.html does not exist on jsFiddle. But IE was not denied access.
I am using form.submit(); It works great.
I have a problem
Here is the link that resolves your Access Denied problem . JavaScript error while trying to access a document object programmatically created (IE only)
You can see your form plugin log by adding this code.
$.fn.ajaxSubmit.debug = true;
Here is the complete code
$.fn.ajaxSubmit.debug = true; $(document).ajaxError(function(ev,xhr,o,err) { alert(err); if (window.console && window.console.log) console.log(err); }); $('form').ajaxForm({ dataType:'html', iframe:true, iframeSrc : "javascript:'<html><body><p>Hello<\/p><script>do things;<\/script>'", success: function(data) { }, beforeSubmit: function(arr, f, o) { }, error: function(responseText){ alert(responseText.status+' :: '+responseText.statusText); } }); $('#submitBtn').click(function(){ $('form').submit(); });
source share