From: Lin H. <lh...@ma...> - 2001-07-27 02:54:57
|
Hello, every one! I am a new babie for DHTML, and I found the menulist widget on line and really like this library! I try to use menuList widget, while meet problems to seek your guys help!!! (1) For the method: pgMenu.list.add(item_number, item_name), I plan to include the html <a> tag in the 'item_name', so the user can be direct to somewhere else by click the item name, it works fine for IE6, but for IE5, the hyperlink has been displayed, but direction is not working. (2) so according to the tutorial, I turn to " pgMenu.OnSelect = MenuListRedirect " but it redirect the user to the item_number set in the "list.add (item_number,item_name) method", eg, 0 or 1. And this redirect functionality works only for a 'leaf' node, for the branch node that contains sub list, when click the node ,it just open the sub list. (3) for NS 6, the menulist is not working at all, so does somebody have a idea? I read some part of code, it seems that, in the MenuListRedirect method, set the 'href' to "list.value". I tried to modified it to list.name and list.text( just guess), but it still not working. So I am wondering is it possible to use a list attribute which keep the 'item_name' value so we can modify the MenuListReidrect code to set the list node's href value to it, so when click it, it will redirect the user to some place. And also, it should be work both for leaf node and branch node? I put a test file at: http://www.cs.lakeheadu.ca/~lhan/php/ml/pgmenu.html, and the file used to generate the menulist node was put into pgmenulist.js. I list the file as the following. Thank you very much! I am looking forward to hearing from you! Regards, Lynch email: lh...@ma... PS: // file name: pgmenulist.js, being included in pgmenu.html function init() { pgMenu.activate() } function menuListHandler() { alert('value = '+ this.list.value) } pgMenu = new MenuList(10,140,180,18) pgMenu.zIndex = 3 pgMenu.overOpen = false pgMenu.list.setImage('./image/list-node0.gif','./image/list-node1.gif',12,18) pgMenu.onSelect = MenuListRedirect pgMenu.list.add(0,'<a href="index.php?pageID=2"> Remote Sensing </a>') pgMenu.list.add(1,'<a href="index.php?pageID=3"> Mineral Exploration </a>') pgMenu.list.add(2,'<a href="index.php?pageID=7"> Forest Resource </a>') pgMenu.list.add(3,'<a href="index.php?pageID=12"> Contact US </a>') pgMenu_0 = new MenuList(pgMenu,0) pgMenu_0.onSelect = MenuListRedirect pgMenu_0.list.add(0,'<a href="index.php?pageID=13"> Forestry Applications </a>') pgMenu_0_0 = new MenuList(pgMenu_0,0) pgMenu_0_0.onSelect = MenuListRedirect pgMenu_0_0.list.add(0,'<a href="index.php?pageID=14"> Operations Monitoring </a>') pgMenu_1 = new MenuList(pgMenu,1) pgMenu_1.onSelect = MenuListRedirect pgMenu_1.list.add(0,'<a href="index.php?pageID=4"> GPS </a>') pgMenu_1.list.add(1,'<a href="index.php?pageID=6"> ML </a>') pgMenu_1_1 = new MenuList(pgMenu_1,1) pgMenu_1_1.onSelect = MenuListRedirect pgMenu_1_1.list.add(0,'<a href="index.php?pageID=9"> ML_sub </a>') pgMenu_2 = new MenuList(pgMenu,2) pgMenu_2.onSelect = MenuListRedirect pgMenu_2.list.add(0,'<a href="index.php?pageID=10"> Mineral Sub </a>') pgMenu.build() writeCSS(pgMenu.css) |
From: Peter J. L. <com...@op...> - 2001-08-07 11:03:36
|
Hi Lin Dynapi 1 is the old version and this is why it is not working with the latest browsers such as NS6 You should download and try the DynAPI 2 and try the list widget. http://dynapi.sourceforge.net/dynapi/index.php?menu=1 Regards Peter Luxmore Lin Han wrote: > Hello, every one! > > I am a new babie for DHTML, and I found the menulist widget on line and > really like this library! > > I try to use menuList widget, while meet problems to seek your guys help!!! > > (1) For the method: pgMenu.list.add(item_number, item_name), I plan to include > the html <a> tag in the 'item_name', so the user can be direct to somewhere > else by click the item name, it works fine for IE6, but for IE5, the hyperlink > has been displayed, but direction is not working. > > (2) so according to the tutorial, I turn to " pgMenu.OnSelect = > MenuListRedirect " > but it redirect the user to the item_number set in the "list.add > (item_number,item_name) method", eg, 0 or 1. And this redirect functionality > works only for a 'leaf' node, > for the branch node that contains sub list, when click the node ,it just open > the sub list. > > (3) for NS 6, the menulist is not working at all, so does somebody have a idea? > > I read some part of code, it seems that, in the MenuListRedirect method, set > the 'href' to "list.value". I tried to modified it to list.name and list.text( > just guess), > but it still not working. So I am wondering is it possible to use a list > attribute which keep the 'item_name' value so we can modify the > MenuListReidrect code to set the list node's href value to it, so when click > it, it will redirect the user to some place. And also, it should be work both > for leaf node and branch node? > > I put a test file at: http://www.cs.lakeheadu.ca/~lhan/php/ml/pgmenu.html, and > the file used to generate the menulist node was put into > pgmenulist.js. I list the file as the following. > > Thank you very much! I am looking forward to hearing from you! > > > Regards, > > Lynch > email: lh...@ma... > > > > PS: > // file name: pgmenulist.js, being included in pgmenu.html > > function init() { > pgMenu.activate() > } > function menuListHandler() { > alert('value = '+ this.list.value) > } > pgMenu = new MenuList(10,140,180,18) > pgMenu.zIndex = 3 > pgMenu.overOpen = false > pgMenu.list.setImage('./image/list-node0.gif','./image/list-node1.gif',12,18) > > pgMenu.onSelect = MenuListRedirect > > pgMenu.list.add(0,'<a href="index.php?pageID=2"> Remote Sensing </a>') > pgMenu.list.add(1,'<a href="index.php?pageID=3"> Mineral Exploration > </a>') > pgMenu.list.add(2,'<a href="index.php?pageID=7"> Forest Resource </a>') > pgMenu.list.add(3,'<a href="index.php?pageID=12"> Contact US </a>') > pgMenu_0 = new MenuList(pgMenu,0) > > pgMenu_0.onSelect = MenuListRedirect > pgMenu_0.list.add(0,'<a href="index.php?pageID=13"> Forestry Applications > </a>') > pgMenu_0_0 = new MenuList(pgMenu_0,0) > pgMenu_0_0.onSelect = MenuListRedirect > pgMenu_0_0.list.add(0,'<a href="index.php?pageID=14"> Operations > Monitoring </a>') > > pgMenu_1 = new MenuList(pgMenu,1) > pgMenu_1.onSelect = MenuListRedirect > pgMenu_1.list.add(0,'<a href="index.php?pageID=4"> GPS </a>') > > pgMenu_1.list.add(1,'<a href="index.php?pageID=6"> ML </a>') > pgMenu_1_1 = new MenuList(pgMenu_1,1) > pgMenu_1_1.onSelect = MenuListRedirect > pgMenu_1_1.list.add(0,'<a href="index.php?pageID=9"> ML_sub </a>') > > pgMenu_2 = new MenuList(pgMenu,2) > pgMenu_2.onSelect = MenuListRedirect > pgMenu_2.list.add(0,'<a href="index.php?pageID=10"> Mineral Sub </a>') > > > pgMenu.build() > writeCSS(pgMenu.css) > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev |