JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Why doesn't this menu code work? (cooljsmenu pro version)

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu
Author Message
g8z
Guest





PostPosted: Sat Jul 26, 2003 9:57 pm    Post subject: Why doesn't this menu code work? (cooljsmenu pro version) Reply with quote

hi,

I've been trying for days to get this code to work but the menu never appears for me. It was appearing for a while but then I changed the "format" property of a couple of items and it broke my menu. Could someone take a look at this code to see why it's not working?

Thanks,
Darren

<script type="text/javascript">

//keywords
var code="code";var url="url";var sub="sub";
//styles
var color = {"border":"#CCCCCC", "shadow":"#CCCCCC", "bgON":"666633","bgOVER":"#00CC66"};
var css = {"ON":"clsCMOn", "OVER":"clsCMOver"};
var STYLE = {"border":1, "shadow":2, "color":color, "css":css};
//items and formats
var MENU_ITEMS =
[

{"pos":[7,275], "itemoff":[20,0], "leveloff":[20,0], "style":STYLE, "size":[21,180]},

{code:"Home", url:"../pages/index.php?ID=1", "target":"_self", "format":{ "image":"../images/menuImages/home2.gif","oimage":"../images/menuImages/home1.gif" }},
{code:"About Us", url:"../pages/index.php?ID=2", "format":{ "arrow":"../images/navmenu/arrowRight.gif", "oarrow":"../images/navmenu/arrowDown.gif", "arrsize":[5,10], "itemoff":[20,0]},
sub:[
{"leveloff":[0,179], "size":[21,170], "itemoff":[20,0]},
{code:"Our Products", url:"../pages/index.php?ID=5&key=1053920122", "target":"_self"},
{code:"Our Services", url:"../pages/index.php?ID=6&key=1053920122", "target":"_self"},
]
},
{code:"Contact Information", url:"../pages/index.php?ID=3", "target":"_self"},
{code:"Image Gallery", url:"../pages/galleryAlbums.php", "target":"_self"},
];

var m1 = new COOLjsMenuPRO("menu1", MENU_ITEMS)
m1.initTop();
m1.init();
m1.show();
</script>
Back to top
Gala
Support Team


Joined: 21 Jul 2003
Posts: 12

PostPosted: Mon Jul 28, 2003 9:23 pm    Post subject: Reply with quote

Hello!
Your menu is broken because you didn't specify width and height for the "image" and "oimage", as it is done in this line ("imgsize" field):
Code:
{code:"Home", url:"../pages/index.php?ID=1",
"target":"_self", "format":{
"image":"../images/menuImages/home2.gif","oimage":"../images/menuImages/
home1.gif", "imgsize":[16,16] }},


Good luck!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu All times are GMT
Page 1 of 1