Skip to content
Advertisement

Tag: iframe

Resizing ‘iframe’ after inside content is loaded

I have an iFrame in which I am loading a page which uses ajax to load data after various page labels are clicked. Now I am using Javascript function to calculate loaded-data height for replacing iframe’s height which results into resizing iframe and thus avoids scrollbars. Now my problem is script gets called as soon as labels are clicked, but

iframe js issues

I’m new to web development and js. I understand some js and jQuery, but not enough to write useful code yet, so I’m hoping to get help here. I’m incorporating some 3rd party web apps into my website via an iFrame (out of pop-up windows and direct links, this is the best way) and have a two part question. 1)

How to communicate between iframe and the parent site?

The website in the iframe isn’t located in the same domain, but both are mine, and I would like to communicate between the iframe and the parent site. Is it possible? Answer With different domains, it is not possible to call methods or access the iframe’s content document directly. You have to use cross-document messaging. parent -> iframe For example

Is an empty iframe src valid?

I want an iframe to initially have src as blank and then once the page loads; call a JS function and then set the src value to an actual one.. So is <iframe src=”#” /> valid OR do I need to use something else like javascript:;, etc Answer just <iframe src=’about:blank’></iframe>

Are there anyway to prevent frame override main window?

I have html page with frame where I want to show some web pages/sites. There are some sites like www.yandex.com which popup from frame and become main window. I want to find some solution to intercept some event or something like this to prevent such subframe activity. Is it possible? Answer You can listen to the onbeforeunload event, which fires

Make an iFrame trigger the body.onclick event

I have a script that attaches a function to be triggered by the the document.onclick event. The problem is that the page has an iframe in it. When the user clicks on the iframe, the document.onclick event does not trigger the function attached to it. Is there any way to fix this? In rare cases, the iframe may have another

Refresh iFrame (Cache Issue)

We are getting a weird issue on which we are not sure what exactly cause it. Let me elaborate the issue. Suppose, we have two different html pages a.html and b.html. And a little script written in index.html: A server component is continuously updating both files a.html and b.html. The problem is the content of both files are successfully updating

Advertisement