Direct links that open pages within an iframe
I have developed an intranet local site that consists of a home page: index.html which contains an iframe.
Above the iframe, I have a navigation bar that opens pages with target:iframe inside the iframe.
iframe's src is set to a page named home.html and this is the page displayed when you visit the site.
I would like to be able to give users links that point directly to certain pages that populate within the iframe and not instructions on how to get to them via the nav bar. And I am not talking about the pages alone but the parent piece where the navigation bar is (nav and iframe are contained in the index.html)
It works...but a couple things
Fang, thanks a lot, it works.
Here is how I am able to point directly to a page inside the iframe:
I either use: http://sitename.com/index.html?pageA.html
I am unable to do it in any other way.
Is the line below supposed to remove the (?) from the address, so I can use the direct page name alone?
data=location.search.substring(1); // remove the '?'
I also noticed that regardless the URL, the page defaults to the home.html (the src of the iframe in index.html) and within a second refreshes and the desired page appears. Is this how it supposed to work?
index.html is my landing page
My landing page is index.html. It contains an iframe. That iframe is set to src=home.html. To change page, you use the toolbar right above the iframe. Above the toolbar, there is a header div that only contains a flash banner
So, it is like this:
These three above make the index.html
All the other pages that I build do not contain the toolbar or the banner. One of them is that initial 'home.html' which is what you see when you visit the site as index.html (or nothing, as index.html is the primary default document on IIS)