I want to load an iframe on click, this is what I have so far:
$("#frame").click(function () { $('this').load("http://www.google.com/"); });
It doesn't work. This is the complete code: JS Bin
However, it's also possible to use a really simple jQuery to access the elements within the iFrame. Check it out below: $(document). ready(function(){ var iFrameDOM = $("iframe#frameID").
You cannot fix this from Power Apps Portal side. Most probably web site that you try to embed as an iframe doesn't allow to be embedded. You need to update X-Frame-Options on the website that you are trying to embed to allow your Power Apps Portal (if you have control over that website).
# jQuery Code to Get HTML Content of IFrame$("#myButton"). on('click', function() { alert($("#myIframe"). contents(). find("html").
$("#button").click(function () { $("#frame").attr("src", "http://www.example.com/"); });
HTML:
<div id="mydiv"> <iframe id="frame" src="" width="100%" height="300"> </iframe> </div> <button id="button">Load</button>
Try $(this).load("/file_name.html");
. This method targets a local file.
You can also target remote files (on another domain) take a look at: http://en.wikipedia.org/wiki/Same_origin_policy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With