The 1st frame is a header with hyperlinks to the main pages on my site map. It is my menu bar. The 2nd frame is my home page. With this, anytime a user uses a hyperlink, the windows open under the header frame. So they keep the menu bar on top of all pages.

My problem is when they click on "open in new window. Then the 1st frame is not called and they loose the menu bar.

Any idea how to (simply...;) ) keep the 1st frame called on "Open in New Window" event?

THANKS A LOT!:D

duniyadnd

01-13-2003, 07:35 AM

Okay, I'm not sure I understand exactly wat the problem is so i'll just post my presumptions, if that's not what you looking for, post the link, or the code for the pages necessary (not just the page setting up the frames).

Thanks for your response and your time.
I am not sure this is what I want though... :confused:

here is my URL: http://www.mydomain.com/main.html

When you go there you see my home page. There is a menu bar on top of it (the 1st frame in my code example above)

If you click on any link (on the page or the menu bar), you go to another page. The top frame (menu) stays on top.

If you use your right click and "Open in New Window", the page opens but without the menu bar that was on the top frame.

Thanks for your help.

Tom

MCookie

01-13-2003, 02:13 PM

Hi,
That's the problem when you use frames. Your pages can get out of their frameset.
Here's a thread about a script that keeps them in there:
http://www.codingforums.com/showthread.php?threadid=12206&highlight=framesaver+joh6nn

ronaldb66

01-13-2003, 03:17 PM

Joh6nns solution mentioned is a very elegant, yet not really simple solution; alternatively, you could make a seperate frameset for each content page with the same menu document in every first frame and link to these framesets, cancelling out part of the advantages (!) of using frames.
By the way: if you take a look a some of the better known professional sites you'll rarely find frames... ;)

balltom

01-13-2003, 05:36 PM

THANKS A LOT FOLKS.
I have been searching with keywords to try to find such information. Was probably not using the right keywords then...:(

I will definitively give it a try.
No big deal anyways, it is just my personal web site... :p
And I agree about the comment on the pros: they don't use frames. But I was not crazy about putting javascripts in all my pages. Might have to to fix this issue though. I'll see...

You guys are great. Thanks for the time spent on this for me.:thumbsup:

Tom

duniyadnd

01-13-2003, 05:51 PM

you could disable right clicking on the top frame, but that doesn't help, cause anyone can just press shift with the mouse button to get the links in a new page.

But yeah, the solution which mccookie gave is the right one, but if you want to avoid using javascript altogether, you might contemplating forgetting about this problem altogether, or you could remove frames and make it in a table format.

If you worried that you going to keep changing your menu system, you can use server side includes (SSI) which is supported by most hosts. In thought process this is very similar to frames, but with a twist.

eg. <!-- virtual include="/somelink.html" --> -> I think its something like that, I haven't used it in a while. Anyway, now the file that will call it is on every single page I have. somelink.html will have all the information for my menu, all i have to do is call that page on every page. If I make a single change in somelink.html, then all the changes will occur for the pages that call it. Also, another thing which I never knew about, but took me about two months to figure out (no one I knew used SSI back then), is that all the files that you use to call in another page using SSIs should have an extension of *.shtml

Hope that gives you new ideas on solving your problem.

Duniyadnd

balltom

01-15-2003, 05:44 AM

Guys,
For information, I looked at the options offered by Joh6nns and friends.
Pretty cool!:)
However I invented a little of my own...
I took the simple one proposed my Mr J that reloads the frame into the main frameset:

But instead of using the default page (problem with dial up modems mentionned by Gordo), I use a special "default" frameset that loads a blank empty page below my menu bar. Much faster to load than my original default page. Does not matter since it is replaced by the page I want to load anyways.

Thanks a lot for your help. I would not have found this by myself!
:thumbsup: :thumbsup: