Results 1 to 1 of 1

Thread: Chained Menu Help.

  1. #1
    Join Date
    Dec 2008
    Location
    Chicago, IL
    Posts
    18
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Chained Menu Help.

    Hey guys, I have a problem with my site AnimeUnloaded.com, you see I'm trying to use this Chained Drop Down Menu, although I have a config.js all in place and everything it just seems its not reading it? Any idea whats going on?

    Here is the Code for the header where the menu is located:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>"  />
    <title><?php if (is_home () ) { bloginfo('name'); echo " - "; bloginfo('description'); 
    } elseif (is_category() ) {single_cat_title(); echo " - "; bloginfo('name');
    } elseif (is_single() || is_page() ) {single_post_title(); echo " - "; bloginfo('name');
    } elseif (is_search() ) {bloginfo('name'); echo " search results: "; echo wp_specialchars($s);
    } else { wp_title('',true); }?></title>
    
    <script language="javascript" src="chainedmenu.js">
    
    /***********************************************
    * Chained Select Menu- By Xin Yang (http://www.yxscripts.com/) & Dynamic Drive (http://dynamicdrive.com)
    * Script featured on/available at http://www.dynamicdrive.com/
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
    * This notice must stay intact for legal use!
    ***********************************************/
    
    </script>
    <script language="javascript" src="config.js"></script>
    
    <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
    <meta name="robots" content="follow, all" />
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    <?php wp_head(); ?>
    
    <!-- this product is released under General Public License. Please see the attached file for details. You can also find details about the license at http://www.opensource.org/licenses/gpl-license.php -->
    
    
    <script type="text/javascript"><!--//--><![CDATA[//><!--
    sfHover = function() {
    	if (!document.getElementsByTagName) return false;
    	var sfEls = document.getElementById("nav").getElementsByTagName("li");
    
    	for (var i=0; i<sfEls.length; i++) {
    		sfEls[i].onmouseover=function() {
    			this.className+=" sfhover";
    		}
    		sfEls[i].onmouseout=function() {
    			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
    		}
    	}
    
    }
    if (window.attachEvent) window.attachEvent("onload", sfHover);
    //--><!]]></script>
    
    
    <!--[if lt IE 8]>
    <link href="<?php bloginfo('template_url'); ?>/ie.css" rel="stylesheet" type="text/css" />
    <![endif]-->
    
    <!--[if lt IE 7]>
    <link href="<?php bloginfo('template_url'); ?>/ie6.css" rel="stylesheet" type="text/css" />
    <script src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js" type="text/javascript"></script>
    <![endif]-->
    
    
    
    </head>
    
    <body onLoad="initListGroup('chainedmenu', document.listmenu0.firstlevel, document.listmenu0.secondlevel, document.listmenu0.thirdlevel, 'savestate')">
    <div id="wrapper">
    
    <div id="header">
    
    <div id="logo">
    <h1><a href="<?php echo get_option('home'); ?>"></a></h1>
    </div>
    
    </div> <!-- Closes header -->
    
    
    
    <div id="catnav">
    <div id="toprss"><a href="feed:<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/rss-trans.png" alt="<?php bloginfo('name'); ?>" width="65" height="24" /></a></div> <!-- Closes toprss -->
    <ul id="nav">
      <li><a href="<?php echo get_option('home'); ?>">Home</a></li> 
      <li><a href= "http://animeunloaded.com/?page_id=17">Streaming Anime</a></li>
      <li><a href= "http://animeunloaded.com/?page_id=79">Contact Us</a></li>
    </ul>
    </div> <!-- Closes catnav -->
    
    <div id="navbar">
    <form name="listmenu0">
    <td><select name="firstlevel" style="width:180px;"></select></td>
    <td><select name="secondlevel" style="width:160px;"></select></td>
    <td><select name="thirdlevel" style="width:160px;"></select></td>
    <td><input type="button" value="Go" onClick="goListGroup(document.listmenu0.firstlevel, document.listmenu0.secondlevel, document.listmenu0.thirdlevel)">
     <input type="button" value="Reset" onClick="resetListGroup('chainedmenu')">
    </form>
    </div>
    
    <div class="cleared"></div>
    Here is the code for the config.js :

    Code:
    //var hide_empty_list=true; //uncomment this line to hide empty selection lists
    var disable_empty_list=true; //uncomment this line to disable empty selection lists
    
    var onclickaction="alert" //set to "alert" or "goto". Former is for debugging purposes, to tell you the value of the final selected list that will be used as the destination URL. Set to "goto" when below configuration is all set up as desired. 
    
    var newwindow=0 //Open links in new window or not? 1=yes, 0=no.
    
    /////DEFINE YOUR MENU LISTS and ITEMS below/////////////////
    
    addListGroup("chainedmenu", "First-Select");
    
    addOption("First-Select", "Select an item", "", 1); //HEADER OPTION
    addList("First-Select", "Webmaster Resources", "", "Webmaster");
    addList("First-Select", "News Sites", "", "News");
    addList("First-Select", "Car Sites", "", "Cars");
    
    addOption("Webmaster", "Select an item", "", 1); //HEADER OPTION
    addList("Webmaster", "JavaScript Links", "", "Webmaster-JavaScript");
    addList("Webmaster", "PHP Links", "", "Webmaster-PHP");
    addOption("Webmaster", "CodingForums.com", "http://www.codingforums.com"); //END OF THIS NODE
    
    addOption("Webmaster-JavaScript", "Select an item", "", 1); //HEADER OPTION
    addOption("Webmaster-JavaScript", "JavaScript Kit", "http://www.javascriptkit.com");
    addOption("Webmaster-JavaScript", "Dynamic Drive", "http://www.dynamicdrive.com");
    addOption("Webmaster-JavaScript", "JavaScript Reference", "http://www.javascriptkit.com/jsref/");
    
    addOption("Webmaster-PHP", "Select an item", "", 1); //HEADER OPTION
    addOption("Webmaster-PHP", "PHP.net", "http://www.php.net");
    addOption("Webmaster-PHP", "mySQL", "http://www.mysql.com");
    
    addOption("News", "Select an item", "", 1); //HEADER OPTION
    addList("News", "General News", "", "News-General");
    addList("News", "Tech News", "", "News-Tech");
    
    addOption("News-General", "Select an item", "", 1); //HEADER OPTION
    addOption("News-General", "CNN", "http://www.cnn.com");
    addOption("News-General", "MSNBC", "http://www.msnbc.com");
    addOption("News-General", "BBC News", "http://news.bbc.co.uk");
    addOption("News-General", "Fox News", "http://www.foxnews.com");
    
    addOption("News-Tech", "Select an item", "", 1); //HEADER OPTION
    addOption("News-Tech", "News.com", "http://www.news.com");
    addOption("News-Tech", "Wired News", "http://www.wired.com");
    addOption("News-Tech", "TheRegister", "http://www.theregister.com");
    
    addOption("Cars", "Select an item", "", 1); //HEADER OPTION
    addList("Cars", "Regular Cars", "", "Cars-Regular");
    addList("Cars", "Sports Cars", "", "Cars-Sports");
    
    addOption("Cars-Regular", "Select an item", "", 1); //HEADER OPTION
    addOption("Cars-Regular", "Toyota", "http://www.toyota.com");
    addOption("Cars-Regular", "Ford", "http://www.ford.com");
    addOption("Cars-Regular", "Nissan", "http://www.nissanusa.com");
    addOption("Cars-Regular", "BMW", "http://www.bmw.com");
    
    addOption("Cars-Sports", "Select an item", "", 1); //HEADER OPTION
    addOption("Cars-Sports", "Porsche", "http://www.www.porsche.com");
    addOption("Cars-Sports", "Aston Martin", "http://www.astonmartin.com");
    Any help would be greatly appreciated.
    Last edited by Tye; 01-14-2009 at 02:41 AM.

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
  •