3

I'm having some weird iframe problems with firefox. I'm using 4.0.1.

I'm embedding a gcal. Here's the code

<iframe src="https://www.google.com/calendar/embed?showTitle=0&showNav=0&showDate=0&showPrint=0&showTabs=0&showCalendars=0&showTz=0&mode=AGENDA&height=400&wkst=1&bgcolor=%23FFFFFF&src=oliversong%40comcast.net&color=%23182C57&ctz=America%2FNew_York" style=" border-width:0 " width="500" height="400" frameborder="0" scrolling="no"></iframe>

And this gcal works perfectly in chrome and opera, just doesn't display at all in firefox. The html isn't called at all, and it just displays an empty iframe with empty and elements.

Funny thing is if I put two of the same iframe consecutively, the second iframe will appear correctly.

I tried doing

<iframe style="display:none"></iframe>
<iframe src="https://www.google.com/calendar/embed?showTitle=0&showNav=0&showDate=0&showPrint=0&showTabs=0&showCalendars=0&showTz=0&mode=AGENDA&height=400&wkst=1&bgcolor=%23FFFFFF&src=oliversong%40comcast.net&color=%23182C57&ctz=America%2FNew_York" style=" border-width:0 " width="500" height="400" frameborder="0" scrolling="no"></iframe>

and to my utter suprise this does what I want it to.

This is super juke-y though and I don't want to leave it at that.

WHY DOESN'T IFRAME WORK IN FIREFOX?

//edit

Another thing: the iframe appears correctly on the google page, where they provide you with the code to embed.

That leads me to believe that my own site is the problem, but I have no idea why that would be the case, because I have no css or javascript targeting iframes or the div containing it. It also doesn't explain why it only happens in firefox. I also tried flushing the cache and clearing cookies and everything.

Oliver
  • 2,182
  • 5
  • 24
  • 31
  • Does the iframe sometimes appear after you refresh the page a few dozen times? I have the same problem with facebook iframe applications. With every other browser it works perfectly, but with Firefox 4 it gives a blank page, doesn't hit the iframe source url at all. I think the problem lies in some firefox extension, and not firefox itself, probably firebug or the developer tools. – DannyKK Apr 19 '11 at 10:01
  • Yes, I think this is likely the cause...Unfortunately for now I have to stick with the empty iframe. Hopefully this gets resolved later on. – Oliver Apr 20 '11 at 05:42

1 Answers1

-1

You need to escape your ampersands (&amp;). Leave them unescaped could mean the URL is being misread.

SpliFF
  • 38,186
  • 16
  • 91
  • 120
  • nah, that's not it, sorry, I replaced the & with & to see if it would make it work but it doesn't. – Oliver Apr 19 '11 at 03:43