Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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:

    Code:
    <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
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,602
    Thanks
    78
    Thanked 4,387 Times in 4,352 Posts
    They do for me.

    If you are talking about images such as assets/menu_02-over.jpg, assets/menu_06-over.jpg, etc. Which are just the same words a bit wider spaced.

    Works fine in FF and MSIE 9.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    jess888 (05-16-2012)

  • #3
    New to the CF scene
    Join Date
    May 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Old Pedant View Post
    They do for me.

    If you are talking about images such as assets/menu_02-over.jpg, assets/menu_06-over.jpg, etc. Which are just the same words a bit wider spaced.

    Works fine in FF and MSIE 9.
    Well that's weird. It wasn't working yesterday.

    THANK YOU!


  •  

    Posting Permissions

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