I have a page from another domain rendered into my main website and positioned to show the relevant content:
<div id="containerdivonparentsite" style="position:relative;overflow:hidden;width:350px;height:650px;">
<iframe style="position:absolute;top:-230px;left:-700px;"
scrolling="no" width="20000" height="5000"
src="http://www.otherdomain.form.com/myform" ></iframe>
</div>
The rendered sub-page contains a form with a submit button. When the user clicks the submit button, a POST HTTP request is issued. Is is possible to somehow "hook" on this POST request in the parent site without enabling CORS?
I would want something like
$('#containerdivonparentsite').onPOST(function (request) {
alert('A POST request was issued by something inside this div. Probably the user clicked a submit button in the iframe.');
})
or maybe a global POST event subscription.
$(document).onPOST(function (request){alert('A POST request was issued on the site. It might be coming from an iframe');})