0

I have an iFrame that needs to display content from another domain. This works fine and I have the height of the iFrame before hand so can set this statically.

The problem encountered is when viewing the iFrame in different browsers.

So, for example, I want to display a page from Wikipedia in the iFrame. This page has a height of 12725px in Chrome, so I can set the height of the iFrame at 12725px.

Viewing this page in Chrome, it fits perfect: http://test.linkinformed.com/temp.html

But view the same page in Firefox or IE, the Wikipedia page content is rendered differently and it no longer fits nicely into the iFrame (ie scroll to bottom of page and the end of the article is hidden).

Given the difficulties in cross-domain iFrame communication, is there a way I can get the Wikipedia content to render identically across browsers? Or is there a way to calibrate or adjust the iFrame height according to browser?

N.N.
  • 8,336
  • 12
  • 54
  • 94
Nick G
  • 1
  • 1
  • take a look at this question: http://stackoverflow.com/questions/207720/computing-a-cross-browser-iframe-height – Sohail Jan 14 '12 at 21:38
  • Unfortunately, I don't think that solution will work when I am accessing content from a remote domain. – Nick G Jan 14 '12 at 23:02

1 Answers1

0

It is a restriction imposed by the wikimedia code not a browser problem.

Here is a link to the fix: Displaying a mediawiki within a iframe

Use the second suggestion of changed the two wikimedia config parameters rather than hacking the .js file.

Worked great for me!!

Community
  • 1
  • 1
Samuel
  • 61
  • 1
  • 2
  • It seems to be an issue across more sites than just wiki. So as a second example, this iframe src is Fox News and it still is clipped on Firefox and IE: http://test.linkinformed.com/temp2.html – Nick G Jan 15 '12 at 14:58