View Full Version : is this possible? iframes and javascript

08-03-2006, 11:49 PM
does anyone know of a way to make the innerHTML of an iframe (<iframe>this stuff here</iframe>) the content that is displayed and not a src? like

document.getElementById("iframe").innerHTML = "Some html"

I need an object that works like an iframe with a scrollbar but just displays data on that page. It also has to include links so a textarea is out. anyideas? Thanks in advanced.

08-04-2006, 03:37 AM
The text inside an <iframe> is only displayed if the browser doesn't support <iframe>s.

You seem to lack the knowledge that CSS can be used to give an element a scrollbar. (http://www.dynamicsitesolutions.com/css/scrolling_element/)

08-04-2006, 02:28 PM
Use a <div>.... and set it's overflow style for the scrollbars.

08-04-2006, 03:13 PM
Thanks! your right i had no idea that css had that kind of capibility. :thumbsup: