Youss
Youss

Reputation: 4212

Iframe not working in Firefox

Please take a look at my website inpages.nl

If you go to the word "weer" and click it an iframe will show up containing some sort of weather map. The problem is that it is not showing the weathermap in Firefox. I googled for it and as it seems Firefox does has issues showing iframes. However the wierd thing is that it DOES show the iframe, its just a the (dynamic) weather chart which is not showing. If I isolate the iframe from the click event and show it on page load than everything seem to work.

Upvotes: 0

Views: 6504

Answers (1)

Roimer
Roimer

Reputation: 1459

After inspecting your html in firefox and chrome, it looks like there is a problem, not in your script but in the page you are opening in the iframe (but don't worry, I found a possible workaround).

First, this is the problem: Use Chrome's inspector and Firefox's firebug and you will see that the iframe is pointing to http://www.weeronline.nl/Go/ExternalWidgetsNew/RainAnd2DaysCity?gid=4057473&temperatureScale=Celsius&defaultSettings=False, inside that webpage there is another iframe pointing to http://www.weeronline.nl/Go/ExternalWidgetsNew/RainWidgetContent?gid=4057473&sizeType=1 (both addresses are the same in both browsers).

Inside that inner iframe there is a div called radar-container, and its css has a .image-rotator-container selector that has set display:none;. In google chrome the div contains an inline style of display:block (and a background-image). But in firefox the div it doesn't have the display:block (only the background image). So, the problem is that teir scripts are not "showing" the map's div.

The good news: it looks like if you reload the iframe "manually" (I did it by adding a fake parameter to the url using firebug: http://www.weeronline.nl/Go/ExternalWidgetsNew/RainWidgetContent?gid=4057473&sizeType=1&foo) you can see the map. So, you can let the url of the iframe empty when the page loads, and then (on $(document).ready()) you set the url.

Side note: your webpage can't find a http://inpages.nl/jquery.nicescroll.min.js and a lot of images from your site. That is not related to your question but you should take a look.

Upvotes: 2

Related Questions