I have a page we can call parent.php . On this page, I have an iframe with a form to submit, and besides that I have a div with the identifier "target". Is it possible to submit the form in an iframe even if the target div is successfully updated. Say, load a new page or something?
Change: the target div is on the parent page, so my question is mainly if you can make a jQuery call for example outside the iframe for the parent. And what will it look like?
Edit 2: So this is how my jquery code now looks. This is on the iframe page. div #target is in parent.php
$(;"form[name=my_form]").submit(function(e){ e.preventDefault; window.parent.document.getElementById('#target'); $("#target").load("mypage.php", function() { $('form[name=my_form]').submit(); }); })
I donβt know if the script is active, because the form is submitted successfully, but nothing happens with the goal.
Edit 3:
Now I am trying to call the parent page by the link inside the iframe. And there is no success either
<a href="javascript:window.parent.getElementById('#target').load('mypage.php');">Link</a>
javascript jquery ajax iframe
Paparappa Aug 11 2018-11-11T00: 00Z
source share