<head><title>menu2.html</title> <script src=../window.js></script> <script src=../examples.js></script> </head> <body> <script> w = new win(100,100,400,400,"The World") w.setServerURL(MSURL) w.setVar("map",MSMAP) // submit immediately submitWin() function submitWin() { w.setVar("mapsize",w.contentWidth + " " + w.contentHeight) w.submit() } w.setExecOnResize(submitWin) countryMenu = new menu ( "red",setCountriesRed, "green",setCountriesGreen, "blue",setCountriesBlue ) latlongMenu = new menu ( "red",setLatlongRed, "green",setLatlongGreen, "blue",setLatlongBlue ) // The second parameter of a menu pair can also be another menu. // In that case it will pop up next to the text mainMenu = new menu ( "Countries",countryMenu, "Latlong",latlongMenu ) mainMenu.realSticky(true) mainMenu.vertical(false) mainMenu.showAt(200,20) function setCountriesRed() { w.setVar("map_countries_class_color","255 0 0") w.submit() } function setCountriesGreen() { w.setVar("map_countries_class_color","0 255 0") w.submit() } function setCountriesBlue() { w.setVar("map_countries_class_color","0 0 255") w.submit() } function setLatlongRed() { w.setVar("map_latlong_class_color","255 0 0") w.submit() } function setLatlongGreen() { w.setVar("map_latlong_class_color","0 255 0") w.submit() } function setLatlongBlue() { w.setVar("map_latlong_class_color","0 0 255") w.submit() } </script> </body>