I want to make an iframe in which i load a web page that i have on other server and i would like to fill some inputs via jquery, i know i cant do this since both apps are on different servers and have different ips, but i tried the next thing.
I made an URL rewrite on my IIS so my Host app matches 192.168.25.17 and made an url for the child app match the next ip 192.168.25.17/mysecondapp so i tried to run a jquery and it failed, so i checked the document.domain and both says its 192.168.25.17 what am doing wrong? or how can i check what is troubling me for working around the policy?
<button class="btn btn-success" id="botondeMagia">Set UserName</button>
<div id="magicContainer">
<iframe id="foo" src="http://192.168.25.17/apex/anapp.faces" height="500px">
</iframe>
</div>
<script>
$("#botondeMagia").on('click', function() {
$("#magicContainer input").val("TEST!!");
$("#magicContainer input").text("TEST!!");
});</script>
I don't know if the next info is useful but, the second app doesnt have jquery, just the hosting app.
The guest app is hosted in tomcat
Thank you very much