Happy Codings - Programming Code Examples
Html Css Web Design Sample Codes CPlusPlus Programming Sample Codes JavaScript Programming Sample Codes C Programming Sample Codes CSharp Programming Sample Codes Java Programming Sample Codes Php Programming Sample Codes Visual Basic Programming Sample Codes


JavaScript Programming

JavaScript > Code Examples

Menu tree

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
Menu tree <HTML><HEAD> <TITLE>Happy Codings :-) Learn JavaScript by Code Examples</TITLE> <SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Calendar.js></SCRIPT> <SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT> </HEAD><BODY BGCOLOR='silver'> <SCRIPT> isc.Tree.create({ ID: "menuTree", root: {name: "root", children: [ {name: "Marketing", children: [ {name: "Advertising"}, {name: "Community Relations"} ]}, {name: "Sales", children: [ {name: "Channel Sales"}, {name: "Direct Sales"} ]}, {name: "Manufacturing", children: [ {name: "Design"}, {name: "Development"}, {name: "QA"} ]}, {name: "Services", children: [ {name: "Support"}, {name: "Consulting"} ]} ]} }); isc.MenuButton.create({ title: "Go to department", width: 140, menu: isc.Menu.create({ data: menuTree, canSelectParentItems: true, itemClick: function (item) { isc.say("You picked the \""+item.name+"\" department."); } }) }); isc.MenuButton.create({ title: "Go to category", width: 140, top: 30, menu: isc.Menu.create({ dataSource: "supplyCategory", canSelectParentItems: true, itemClick: function (item) { isc.say("You picked the \""+item.categoryName+"\" category."); } }) }); </SCRIPT> </BODY> </HTML>