SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Mar 2006
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Make top menu stretch across page if screen res=800x600

    There is a menu.js which is at the top of every page in a site. It looks good, works great, but set the screen res to 800x600 for testing and the menu stops while the html table under the menu does stretch across the entire page because table width=100%. Here is the code of the external file that, as far as I know, doesn't soley apply to the buttons and their dropdowns.
    HM_Array2 = [
    [126, // menu width
    0, // left_position
    0, // top_position
    "#FFFFFF", // font_color
    "#000000", // mouseover_font_color
    "#003366", // background_color
    "#E0E0E0", // mouseover_background_color
    "#11477C", // border_color
    "#11477C", // separator_color
    1, // top_is_permanent
    1, // top_is_horizontal
    0, // tree_is_horizontal
    1, // position_under
    0, // top_more_images_visible
    1, // tree_more_images_visible
    "null", // evaluate_upon_tree_show
    "null", // evaluate_upon_tree_hide
    ], //right-to-left

    I tried modifying the [126, // menu width
    part but that applies to the actual button on the menu, not the entire menu. Do I have to declare something on every page or is it something that can be added to this external file?
    This is the code in every .htm file that calls the menu and it seems to me that there is something within this that I have to change. I have googled this but it is hard to know what is the answer if I really don't understand the problem. I'm an html girl, so javascript is intimidating to say the least. Please don't make fun of me or ridicule me for asking this question. If you don't want to or can't help me, then you don't have to, it's ok. Just, if someone looks at this and thinks, 'Ah yes, I've seen this before, here's what you do', then that would be awesome.

    <SCRIPT LANGUAGE="JavaScript1.2" SRC="menu/HM_Loader.js" TYPE='text/javascript'></SCRIPT>
    <script language="JavaScript">
    <!--
    function MM_reloadPage(init) { //reloads the window if Nav4 resized
    if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    // -->
    </script>

    Here is the code just before the code that is above this sentence. This code is on every .htm file, not external.
    <SCRIPT LANGUAGE="JavaScript1.2" TYPE="text/javascript">
    // Copyright (c) 2001 Peter Belesis. All Rights Reserved.
    // Originally published and documented at http://www.dhtmlab.com
    // You may use this code on a public Web site only if this entire
    // copyright notice appears unchanged and you publicly display
    // a link to http://www.dhtmlab.com/.
    // Contact peter.belesis@btclick.com for all other uses.
    // Courtesy of SimplytheBest.net (http://simplythebest.net/info/dhtml_scripts.html)
    <!--
    HM_PG_MenuWidth = 110;
    HM_PG_FontFamily = "Verdana,Arial,sans-serif";
    HM_PG_FontSize = 8;
    HM_PG_FontBold = 0;
    HM_PG_FontItalic = 0;
    HM_PG_FontColor = "#666666";
    HM_PG_FontColorOver = "#000000";
    HM_PG_BGColor = "#FFFFFF";
    HM_PG_BGColorOver = "#CCCCFF";
    HM_PG_ItemPadding = 3;

    HM_PG_BorderWidth = 1;
    HM_PG_BorderColor = "666666";
    HM_PG_BorderStyle = "solid";
    HM_PG_SeparatorSize = 1;
    HM_PG_SeparatorColor = "#666666";
    HM_PG_ImageSrc = "images/tri.gif";
    HM_PG_ImageSrcLeft = "images/triL.gif";

    HM_PG_ImageSize = 16;
    HM_PG_ImageHorizSpace = 1;
    HM_PG_ImageVertSpace = 2;

    HM_PG_KeepHilite = true;
    HM_PG_ClickStart = 0;
    HM_PG_ClickKill = false;
    HM_PG_ChildOverlap = 20;
    HM_PG_ChildOffset = 10;
    HM_PG_ChildPerCentOver = null;
    HM_PG_TopSecondsVisible = .5;
    HM_PG_StatusDisplayBuild =1;
    HM_PG_StatusDisplayLink = 0;
    HM_PG_UponDisplay = null;
    HM_PG_UponHide = null;
    HM_PG_RightToLeft = false;

    HM_PG_CreateTopOnly = 1;
    HM_PG_ShowLinkCursor = 1;
    HM_PG_NSFontOver = true;

    //HM_a_TreesToBuild = [1,2];

    This is a website I'm working on for work. If I am violating some kind of copywrite, I'm sorry. I put that code up there so hopefully that is sufficient. That guy built the site in 02 and I have recently been hired here. I am updating the site. It is done except that, only when setting screen res to 800x600, the javascript menu doesn't fill up the whole page like the html table below it does when side scrolling.
    The website is http://www.crc.cc/crc/default.htm. The website you can reach on the internet does not contain any work that I have done. None of my work has been pushed out to the server yet b/c it is not ready. I still have some screenshots and things to do.

  2. #2
    I'll take mine raw silver trophy MikeFoster's Avatar
    Join Date
    Dec 2002
    Location
    Alabama, USA
    Posts
    2,560
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    With due respect to Peter Belesis, I say throw it out and start over with some other menu. It will take longer to fix that one than to start over.

    So you can...

    1. Debug Peter's menu.

    2. Implement some other Js/CSS menu.

    3. Implement a pure CSS menu.

    Before going too far I would ask in the CSS forum for advice. There are some real gurus there. Ask them to look at your page and suggest a replacement CSS menu.

    Also, if you're interested, we can suggest other Js menus.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •