Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IFrame Question

Status
Not open for further replies.

ddfff

MIS
Sep 27, 2002
125
0
0
US
I have two questions about IFrame. Greatly appreciate an answer to 1 or both.

1. I am calling a page within a page via the use of IFrame. The IFrame is embedded within TD tags of the calling page and I would like the IFrame to be the exact size in width and heigth of its source page. I set the iframe width to 100% and this works for the width aspect. However, it will not allow me to use 100% for height. Is there a way make the size of the IFrame equal to the height of its source page?

2. The background color of the calling page is black and so is that of the iframe. However, when the iframe is loading, it displays white until the loading is complete. I tried setting the bgcolor for the iframe, td, table, and body tags all to black but the white color continues to show up until the source page is loaded in the iframe. Is there a way to make the bgcolor remain black while the source page is loading in the iframe?

Thanks very much in advance.
 

1. You will probably have to use JavaScript for this... suggest asking in the JavaScript forum.

2. How are you setting the bgcolor? Have you tried using CSS?:

Code:
<iframe style="background-color:#000000;">

Hope this helps,
Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Try setting up a window.onload function for the iframe and setting the height of the iframe to the height of its document there (not 100%, get the height of the document and set the iframe height to that).


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Ya know, I tried:

<iframe style="background-color:#000000;">

The frame still appears white when loading. It's especially noticable because I have a few images on this screen.

Any other ideas?
 
ddfff

1. Since you don't post any code or links it is hard to guess what you are doing. On the face of it removing scrollbars from the iframe and then having to use the windows scroll bars doesn't seem to make a lot of sense. I would use a 2 frame left/right frameset instead, When you set the right to scrolling="yes" it just looks like a normal window with a scrollbar and the left stays stationary.

2. I think all windows start as white. It is probably loading the images that is taking the time.

Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top