Ugrás a tartalomhoz Lépj a menübe

EZ itt a KÖVETKEZŐ

Weblaplátogatók száma:

 

I am trying to implement a chained selection menu in the description area of one of my categories.(http://spaparts1.com/index.php?main_...ndex&cPath=101) The blank form comes up but with no content. Any help will be greatly appreciated. The code I have placed on the category Page is: Chained Selects

Notes

  • An arbitrary string ("savestate") is passed in as the last argument of function initListGroup() inside this page, "sample.html", enabling the session-only cookie persistent feature. What this means is that the script will save and load the last state of the chained Selection lists when you reload or return to this page. See the documentation in chainedmenu.html for more info.
  • Disable empty lists feature is enabled, so empty lists are disabled (grayed out).

Dynamic Drive- Chained Select Menu

I have placed 2 javascript files in my includes/templates/my_temlate/jscript file as follows: Script 1 chainedmenu.js // Chained Menu // Copyright Xin Yang 2004 // Web Site: www.yxScripts.com // EMail: m_yangxin########################## // Last Updated: 2004-08-23 // This script is free as long as the copyright notice remains intact. var _disable_empty_list=false; var _hide_empty_list=false; // ------ ///// DynamicDrive.com added function///////////// var onclickaction="alert" function goListGroup(){ for (i=arguments.length-1;i>=0; i--){ if (arguments[i].selectedIndex!=-1){ var selectedOptionvalue=arguments[i].options[arguments[i].selectedIndex].value if (selectedOptionvalue!=""){ if (onclickaction=="alert") alert(selectedOptionvalue) else if (newwindow==1) window.open(selectedOptionvalue) else window.location=selectedOptionvalue break } } } } ///// END DynamicDrive.com added function////// if (typeof(disable_empty_list)=="undefined") { disable_empty_list=_disable_empty_list; } if (typeof(hide_empty_list)=="undefined") { hide_empty_list=_hide_empty_list; } var cs_goodContent=true, cs_M="M", cs_L="L", cs_curTop=null, cs_curSub=null; function cs_findOBJ(obj,n) { for (var i=0; i=0; i--) { list.options[i]=null; } } function cs_refreshList(list,opt,df) { cs_emptyList(list); for (var i=0; i0) { list.selectedIndex=df; } } function cs_getOptions(menu) { var opt=new Array(); for (var i=0; i0) { cs_initListGroup(content,content.cookie); } } } function resetListGroup(n) { var content=cs_findContent("cs_"+n); if (content!=null && content.lists.length>0) { cs_initListGroup(content,""); } } // ------ Scipt 2 config.js //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");