embedding menu in an include

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
wetclay
Advanced
Advanced
Posts: 11
Joined: Tue Jan 11, 2005 3:09 am

embedding menu in an include

Post by wetclay »

Just to let you know...i'm using M$ Frontpage to design my site...i'll wait for the laughing to stop.....ok good, I'm used to it by now.

ok, here is my trial page: http://www.wetclaywebdesign.com/calvary ... ect_copy(1).htm

at the moment the menu is placed absolutely on that page, I would like to have the whole page centered in the browser and have it look like this: http://www.wetclaywebdesign.com/calvary ... ctions.htm with the menu replacing the grey bar below the blue title bar.

The way I have used menus in the past is to place the menu on it's own page with nothing else and then put an "include" command in a cell of a table on all the other pages.

The issue I'm going to have is that if I have to place the milonic link somewhere on the page with the menu, I can't use the "include" command because the page is going to have that required link in the cell also. Is there a way to post that link on the page with all the content and not on the page with the menu and still have it remove the milonic link from the menu. Or is there another solution to my problem.

The other thing I tried but won't work is to absolutely position the menu, but when a user resizes his browser window the menu will move horizontally according to the width of the browser window.

I'm lost with css positioning and I am a fairly illiterate with coding. Any help would be great.
thanks
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

I'm a little confused by your question. The required link needs to be anywhere on the page, not included with the menu. I'd suggest making your footer an include. That way it will automatically be on every page, and any changes (like 2005!) can be made in one file.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I agree with John, put the link in the footer include. Then, you can place the menu in that table cell where you show you want it. If you do that you can then either put the actual main menu in the cell or you can make a separate file with only the main menu in it and call the file to the cell. Using your layout, I have the following:

Code: Select all

 <TABLE id=AutoNumber4 style="BORDER-COLLAPSE: collapse" 
            borderColor=#111111 cellSpacing=0 cellPadding=0 width=550 
              border=0><TBODY>
              <TR>
                <TD width="100%" bgColor=#cccccc height=18><!--webbot bot="Include" U-Include="mockUps/horizontalMenu.htm" TAG="BODY" startspan -->                  
  <SCRIPT type=text/javascript>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
position="relative";
menuwidth="100%";
itemwidth="15%";
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://www.wetclaywebdesign.com/calvary2004folder/calvary2004/index.htm/;status=Back To Home Page;");
aI("text=About Us;showmenu=AboutUs;");
aI("text=Services;showmenu=Sevices;");
aI("text=Ministries;showmenu=Ministries;");
aI("text=Questions;showmenu=Questions;");
aI("text=Calendar;url=http://www.wetclaywebdesign.com/calvary2004folder/calvary2004/calendar.htm;");
aI("text=Contact;url=http://www.wetclaywebdesign.com/calvary2004folder/calvary2004/contactUs.htm;");
}
drawMenus();
</SCRIPT>
<SCRIPT src="" type=text/javascript></SCRIPT>
                  <NOSCRIPT>Your browser does not support script</NOSCRIPT> 
                  <P>&nbsp;</P><!--webbot bot="Include" i-checksum="18538" endspan --></TD></TR></TBODY></TABLE>

Make sure you read the directions for putting the menu in the cell. Right now, that gray will be higher than the menu because you have the paragraph code there. Also, you need to remove the div. The menu does not react well to being in a div even if it's not in a table, it is built of divs, spans etc, so putting into one causing conflicts.

TABLE BOUND MENU DIRECTIONS

Hope that helps.

Ruth
wetclay
Advanced
Advanced
Posts: 11
Joined: Tue Jan 11, 2005 3:09 am

Post by wetclay »

thanks for your help. Like I said, this is a work in progress so the dating is not "up to date" among many other items that need work.

I didn't know if placing the link in an include on a seperate page would allow the menu to remove the milonic link, since it is actually not on the same page, but in an included page.

I'll give that a try. thanks again.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Take a look at the source of your main page. You'll see, as I'm sure you know, the includes have actually become part of the main code (the include statement is no longer there). The only thing I'm a little worried about is the menu code comes in way up at the top. If it does the link search before the page has finished loading it won't see the link in the footer.

Let us know.
John
Post Reply