This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
can one link open two files in two different frames?

I am trying to open a header file in a header frame and a text file in the body frame both from the same link. In other words when you click on the "home page" link I want a stationary header to open in the header frame that has the words "Home Page" But at the same time, I want that link to also open the "Home Page" contents file in a scrollable frame underneath the header frame. One link, one click, two frames, two files. Can it be done? How? What is the HTML code? TIA

Browser: roundmot,2

Re: can one link open two files in two different frames?

Not possible with html. You can do it with Javascript. I have linked above to a free script library.

Re: can one link open two files in two different frames?

Peter, Thanks for the reply. But I do not see the jave link that you mentioned. What am I overlooking? Also, I have never worked with java before, and have no idea how to integrate it with my page. HELP. LOL TIA

Browser: roundmot,2

Re: Re: can one link open two files in two different frames?

I think that the way links display varies between "board view" and "threaded view". Switch views if you have a promblem picking up a link.

To use JS you need to be comfortable with editing the underlying code.

Re: can one link open two files in two different frames?

Richard,

There is nothing wrong with Peter's answers, I'm just adding my tw cents. My first site was based on frames, but it turned out to be a huge headache to support. I still like using frames, but I have a hard time justifying it's use. But I had the same need as you.

As Peter suggested, you can load multiple frames with a single link using Javascript. The way I did it was to first create a Javascript wrapper for each of my pages. For example, the following Javascript functions are for opening a toolbar, targeted to the "toolbar" frame, and a main page, targeted to the "main" frame.

function Top_Toolbar() {
TT=window.open('toolbar.html','toolbar',
'toolbar,location,directories,menubar,resizable,scrollbars,status');
TT.document.close();
}

function Top_Main() {
TM=window.open('main.html','main',
'toolbar,location,directories,menubar,resizable,scrollbars,status');
TM.document.close();
}


Then from my web page, I could simply use a link that looked like the following:

Back To The Beginning

The above example is from a two framed setup, but you can have as many frames as you want as long as you target them properly. If you have a page that needs to be opened in a different frame, depending on the circumstances, you could modify the wrappers and pass the target information as a parameter.

If you put the Javascript wrappers in a separate file, and source it from all of your pages, you only have one place to keep track of your wrappers.



In the end, I didn't find any real advantage to using frames, so I modified it. I switched over to a based template and found it much easier to manage the 40 odd pages. I still use a lot of Javascript throughout my site, and my main navigation is Javascript.