Ive installed the menu script into an oscommerce site and i cat seem to get it to work.
I constantly get an error saying that MENU_ITEMS is undefined.
any ideas as to what may be causing this???
1. Name of the variable in configuration file is different from the name of variable passed to menu constructor. I.e. you have MENU_ITEMS1 in menu_items.js file but MENU_ITEMS2 in new menu statement in HTML file
Now about your particular case: I've removed all responses from this thread as they don't lead to the solution. Maybe it's rude but I prefer to save readers from confusing reading. HTML errors can cause the problems but they don't result in 'variable is undefined' errors. I've checked the structure you provided with working script configuration and it is errors free (having empty strings for menu items is not the best idea though) so it's not condition 3. Variable names seem to be identical so it?s also not condition 1. So what's left is condition 2 - check if file is on the server, linked properly and can be accessed by the browser.
thanks for all the great help ive gotten so far. The only reason i have empty strings is because they sit over the buttons images i have on the
Well at least that was the theory.
I created a duplicate of the index.php page and called it index2.html and removed all unrelated html from it and the menu indeed works, so i know im linkin to it properly.
I will have to assume that it doesnt work because of the fact that the page displayed is built using php includes. Its the only explanation i can come up with that could explain it.
Ive been right thru my html and error checked it and apart from missing alt"" tags on images there are no errors.
Im out of ideas... any further suggestions?
Ah Found the problem :)
because i had the top level of the menu strings empty it wasnt displaying on the php page.
which is weird cause it worked by itself on the test page i did.
I added text to the top levels of the menu and low and behold there it was...so for some reson it requires text on the top level to work in oscommerce
Thanks for all your help :)