Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:10
Dynamic Main Menu
Poster: VictorKush
Dated: Tuesday March 28 2006 - 1:52:07 BST
I have been able to set the menu items dynamically with ASP script code using something like this:
<% if x=true then %>
aI(text=xxxurl=yyyy);
<% end if %>
This works fine. However, when using the exact same conditional code on the main menu items 'aI(text=zzzzshowmenu=aaaa)';, a javascript error shows up and the menus don't display. Probably a stupid user error..any ideas?
Thanks
Poster: John
Dated: Wednesday March 29 2006 - 15:40:12 BST
If what you entered above as your samples is what you're really using, you have serious syntax problems.
Code:
'aI(text=zzzzshowmenu=aaaa)';
should be...
Code:
aI("text=zzzz;showmenu=aaaa;");
Same for the ASP. Should be...
Code:
aI("text=xxx;url=yyyy;");
etc.
Syntax
Poster: VictorKush
Dated: Wednesday March 29 2006 - 17:06:41 BST
This is not a syntax issue. I have the menu syntax correct on the pages and they are working fine. I was giving you an example of the ASP logic that was used with the main menu as the submenus. Of course we are using the the show menu and the syntax is correct.
I was simply trying to explain that the ASP script logic was not working on the main menus but works fine with the sub menus. Taking out the ASP logic, the menus work fine.
It doesn't matter anyway, I found a work around.