SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Conflicting Javascript

    I have some kind of conflict in my Javascript here:
    http://www.SonomaCountyFamilyLaw.com

    Drop down menu pops up when one scrolls over "Family Law," but rollover images do not load on other menu items as they should

    I am relatively new to Javascript; would much appreciate any assistance.


    Thank you kindly....

    Here is the code in question:

    <script type="text/javascript">function mmLoadMenus() {
    if (window.mm_menu_0514172011_0) return;
    window.mm_menu_0514172011_0 = new Menu("root",298,24,"Arial, Helvetica, sans-serif",14,"#FFFFFF","#020056","#3C3A7D","#FFFFFF","left","middle",5,0,100,-5,7,true,true,true,5,true,true);
    mm_menu_0514172011_0.addMenuItem("DIVORCE","location='divorce.html'");
    mm_menu_0514172011_0.addMenuItem("CUSTODY","location='custody.html'");
    mm_menu_0514172011_0.addMenuItem("ADOPTION/GUARDIANSHIP","location='adoption.html'");
    mm_menu_0514172011_0.addMenuItem("PRIVATE JUDGING & SETTLEMENTS","location='private.html'");
    mm_menu_0514172011_0.hideOnMouseOut=true;
    mm_menu_0514172011_0.bgColor='#FFFFFF';
    mm_menu_0514172011_0.menuBorder=1;
    mm_menu_0514172011_0.menuLiteBgColor='#FFFFFF';
    mm_menu_0514172011_0.menuBorderBgColor='#434089';

    mm_menu_0514172011_0.writeMenus();
    } // mmLoadMenus()var switchTo5x=false;

    function newImage(arg) {
    if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
    }
    }

    function changeImages() {
    if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
    document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
    }
    }

    var preloadFlag = false;
    function preloadImages() {
    if (document.images) {
    menu_02_over = newImage("assets/menu_02-over.jpg");
    menu_06_over = newImage("assets/menu_06-over.jpg");
    menu_08_over = newImage("assets/menu_08-over.jpg");
    menu_10_over = newImage("assets/menu_10-over.jpg");
    menu_12_over = newImage("assets/menu_12-over.jpg");
    menu_14_over = newImage("assets/menu_14-over.jpg");
    preloadFlag = true;
    }
    }

    // -->
    </script>
    <!-- End Preload Script -->
    <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
    <script type="text/javascript">stLight.options({publisher:'04ce05ad-19c3-4812-98d3-7e46a3d579db'});</script>
    <script language="JavaScript" src="mm_menu.js" type="text/javascript"></script>
    </head>
    <body onload="preloadImages();">
    <script language="JavaScript1.2" type="text/javascript">mmLoadMenus();</script>

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by jess888 View Post
    I have some kind of conflict in my Javascript here:
    http://www.SonomaCountyFamilyLaw.com

    Drop down menu pops up when one scrolls over "Family Law," but rollover images do not load on other menu items as they should
    A rollover image seems to load for me in Chrome on all of the other menu items. The rollover image is a larger version of the menu name, right?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •