I am building a page at http://www.localurl.com.
I want to submit a POST form that is on http://www.url.com/form_step_1.html to http://www.url.com/form_step_2.html and display http://www.url.com/form_step_2.html in an iframe.
Is this possible to do with JavaScript/jQuery or does browser security prohibit this? Is there anyway it can be done with ajax?
You cannot execute Javascript on a different domain that you do not have access to.
If you do have access then use:
on both pages. You can then submit a form within the iFrame with this:
or
NOTE: This probably won’t work in IE8.
Alternatively, you could create your own page on your domain using php:
Open this page (which is on your local host) in your iframe and use:
or
window.myiframename.document.myformname.submit();