If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

iFrames ... please don't hate me

Ok, please don't hate me for this, but I am going to ask if someone would actually make me a webpage. I have tried and tried for so long to get this to work. I have consulted forum after forum, but I still don't know how. It must be something fairly simple tooooooo...oh.uhuhumbluberblubber....

Here it is - real simple. I want a page and at the top it should have two buttons. One shows/hides a first iframe. One show/hides a second iframe. When the page loads, both iframes display below the buttons, each taking up 50% of the page. But when button 1 is pressed, the first iframe disappears and the second expands to take up the whole page. When button 1 is pressed again, the first iframe reappears and takes up 50% again. Same for the second button. Easy or what? I KNOW...IT SOUNDS SO EASY!!!! So why can't I make it work...

also a few tips. Since your dealing with Iframes, you need to put the script on the bottom of the page or call it on window.load becuase it appears the browser will not recognize the Iframe as an object until it's done loading, which takes a moment, my preference is to put it at the bottom.

also, it's not logical to show the iframe at 100&#37; unless you contain it in a wrapper so I went with 80%

and I would recommend against declaring height and width via CSS and inline css, use one or the other.

Thanks

Thank you very much! Unfortunately, this is not quite what I was trying to do. I really appreciate your help anyway though!

I should have made myself more clear: I am looking for am iframe which takes up half the page, but I meant half the page vertically, both iframes being side by side on the page, rather than one above another. I trying to make the frame page display two documents side by side, but then if the user only wants to see one, he can switch off one iframe as it were, and view the one he wants across the full width of the page.

Don't feel you have to help again - it was very kind of you to try helping already!