Forum Moderators: open
I put together a page with 6 iFrames contained in 6 layers. A different external webpage is brought into each iFrame. I have no control over the content of the pages that are brought into the iFrame. I have a navigation bar at the top of the page that uses "onclick" to show and hide each layer. The idea is that I can navigate between the layers copying and pasting as I go.
The problem is that the browser history sees all the layers as one page. This makes going "back" very difficult. The user will expect the visible layer to go "back." But, the back button will go back in the browser history which could undo some work that was done in forms on hidden layers.
This problem has brought to mind a few questions:
1. How do I get separate histories for each layer and have a "back" button that goes "back" only in the visible layer?
2. Would it be easier to drop the layers and only work with iFrames? And if so, how do I show/hide iFrames to make the page work? Do iFrames keep thier own window history?
A (hideously) rough example of what I'm working with is <sorry, no personal URLs>. Thanks in advance for any ideas.
[edited by: tedster at 3:59 pm (utc) on Sep. 30, 2002]
I've been wrestling with your purpose all day. Yes, iframes alone will each retain separate browser histories.
BUT - your show/hide purposes then run into a snag.
Have you considered scrolling down the page, and having all the iframes available simultaneously? Each one can still have its own scrollbar, so you can pop around to any part of the page.
Thanks for the input and time spent. At first I really did not like your idea of having all the iFrames available on the same page. But after I visualized it I thought about a tutorial that I saw once where the iFrame was resized on the fly by clicking a button.
Do you think it would be possible to have all the iFrames on the same page but instead of using the navigation bar to show/hide, use it to change the size of the iFrames from 1x1 to full size? This would get rid of layers all together and possibly solve the "back" issue.
I will start digging to find that tutorial that I saw so long ago. If you have any ideas about how to resize an iFrame by clicking a link, please post it if you get a chance. I really appreciate it.
-nrock