tags:

views:

224

answers:

1

I am looking for way to implement iframe just like a frame.

There is a problem with scroll bar when I update the src of it. It sometimes disappears for some web pages (like Yahoo.com). And I have to work against frame breaker too.

There is a very good implementation that fits my need. It is the Navigator of EyeOS. I would like to know if there is any similar implementation that is standalone and off-the-shelf.

The reason I am not using frame is that I am not allowed to have JavaScript drop-down menu over the frame. As far as my research goes, it is not possible except for HTML combobox control. Please let me know if I am incorrect. :-)

+1  A: 

I'm sorry, but I have to question your means to reaching your goal. Why do you need an iframe in the first place? Can the problem in question be solved with ajax and/or a scrollable div element?

With

div.scroll { overflow: scroll; }

in your css, you can make the contents of any div scroll just like an iframe. With the help of jQuery, making cross-browser compatible AJAX request is peanuts. =)

Please be more specific: exactly what is it that you want to accomplish with the iframe?

Tomas Lycken
Thanks for your reply. My primary need to have a way to build a wrapper of all pages. That's why I need either a frame or iframe. :-)
Timothy Chung
OK. Are you using any type of server-side scripting, like php or ASP.NET? If so, you should be able to do the work on the server side, before returning the data to the client - for example, ASP.NET has the Masterpages.If you're only using html, I'd recommend jQuery AJAX. Most users today allow js.
Tomas Lycken
The problem is that I am building a wrapper of pages I do not own. So I cannot use the technique you suggested. :-)
Timothy Chung
Why not? If they're designed to fit in the iframe, they should fit just as well in a div. If you can get them to the iframe with a regular call, you can get them to the div with an ajax call.
Tomas Lycken
I am having the exact same problem. So far I have a partial solution involving lots of goofy javascript. The idea is to copy your drop down menus to the other frame....http://stackoverflow.com/questions/2715447/how-can-i-programmatically-copy-all-of-the-style-attributes-from-one-dom-element
stu