Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dhtml with frames 1

Status
Not open for further replies.

rhcp

Programmer
Dec 27, 2003
11
IL
hey people. I came across a bothering kina-of-theoretical problem. I just made me a nice horizetal menu bar! and it works well. here is the problem- when I click on the drop down menu, I want it to be opened below without loading again the menu code. It Can't be done with frames!- when having frames, you'll only see some of the drop down of the drop down menu because it overlaps with the main frame!!!!. I think solving this problem should requier using a <div> and then, somehow load the html's into it. I have checked some sites with menu's in them and saw that they load the whole menu code again with each html (?!).
please share with me your thoughts about this, Thx.
 
The use of frames causes many problems with these kinds of menu solutions. You do *not* need to load new &quot;copies&quot; of the menu code however.

If your main navigation frame contains code to do horizontal menus, and you wish to avoid the drop downs from disappearing (into the rest of the masked page in the frame)... then you could look into cross frame communication.

As you click on the menu in the navigation frame, the javascrpt code sets the html of a div (with a specific id) that lives on the actual page frame (not in the navigation frame).

You would need to have defined the div on each page (but you could use an include to define it), and set display:none so it never shows on the page.

Your menu code will target the div, load the html into it (relevant to the menu you want to display), move it to the right location (right beneath the menu you are clicking on) and then make it visible.

Making use of setTimeOuts and clearTimeOuts you can allow the user to safely navigate from the top navigation frame to the bottom content frame without causing the menu to disappear.

It's a big job... but it doesn't require the code to be loaded onto every page.

Anyway... that's one of many many ways I can imagine achieving this task.

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top