PDA

View Full Version : IFRAME == Scrolling DIV ?



pb&j
Feb 26th, 2003, 03:31 PM
Now I know that IFRAME is like a mini version of frames in that it calls a new page into that area.

I've found the DIV has capabilities of being a specific size and scrollable similar to the IFRAME, but, can it mimic the iframe capabilities totally and change its information too?

I have about 200 non-framed (static) pages right now and I'd like to move into one of these two formats that would fit the bill. DIV would be the favored if its possible.

thox
Feb 26th, 2003, 03:53 PM
In a word, no

You can't change the content of a scrolling DIV as easily as you could with the IFRAME. I can't imagine any other differences.

Perhaps a client script to change the content, or dynamically generated pages with changeable DIV content.

cg9com
Feb 26th, 2003, 04:14 PM
the content of the div could be changed, but would require javascript, iframe would be easier.

Grant Palin
Feb 26th, 2003, 05:26 PM
How would you do it then? I mean, how would you change the contents of a div?

thox
Feb 26th, 2003, 05:43 PM
javascript:
<div element>.innerHTML = <contents>

pb&j
Feb 26th, 2003, 06:34 PM
:thumbsup:
Thanks for the input.

cg9com
Feb 26th, 2003, 07:10 PM
Yes could be done easily, look into DOM.

Quiet Storm
Feb 26th, 2003, 11:57 PM
Personally, I'd suggest iFRAMES... IE only, but a lot less coding.

:)

pb&j
Feb 27th, 2003, 05:26 AM
Originally posted by Quiet Storm
Personally, I'd suggest iFRAMES... IE only, but a lot less coding.

:)
I dl Netscrap7. It has adopted a few IE things such as Iframe, and I think it now also includes support of favicon and stationary backgrounds.

But along the lines of supportiveness, I've been leaning towards the scrolling div and just reloading the constant areas on each page.

mouse
Feb 27th, 2003, 08:07 AM
I saw a javascript faux-IFRAME that worked in Netscape, quite nifty actually, I think there may have been browser sniffage involved but it mimicked an iframe faultlessly. Iirc it was the website for the band, Garbage, however twas a long time ago so all may have changed.