0

i have two websites 1. https://dl.dropbox.com/u/43733183/FacebookPages/tes.html 2. http://iamjusttestingiframe.blogspot.com

I want to display first page on the second page. I am using iframe for doing that. I can control the weight of iframe, but for height i have problems

Below is my code

<iframe frameborder="0" id="iframe1" marginheight="0" marginwidth="0" scrolling="auto" height="100%" src="dl.dropbox.com/u/43733183/FacebookPages/tes.html"; width="100%"></iframe>

How can i place it into my first website with full height? I want to have one main scrollbar on my page.

Thanks

Viral Shah
  • 2,263
  • 5
  • 21
  • 36
Armen Mkrtchyan
  • 921
  • 1
  • 13
  • 34

1 Answers1

0

Untill otherwise you know the height of the document in the iframe you will not be able to set the height for the iframe.

you can find the height of the document using javascript, but in your case this is not possible as the document inside the iframe is in a different domain, security doesnt allow cross domain javascript.(there are many ways of communication between cross domain, please google for cross domain java scripting or window.postmessage or hash based cross domain scripting)

your height for an iframe in % will not work in this scenario, you need an absolute size interms of px.