Dynamic Main Menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
VictorKush
Beginner
Beginner
Posts: 3
Joined: Tue Mar 28, 2006 1:46 am
Contact:

Dynamic Main Menu

Post by VictorKush »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

If what you entered above as your samples is what you're really using, you have serious syntax problems.

Code: Select all

'aI(text=zzzzshowmenu=aaaa)';
should be...

Code: Select all

aI("text=zzzz;showmenu=aaaa;");
Same for the ASP. Should be...

Code: Select all

aI("text=xxx;url=yyyy;");
etc.
John
VictorKush
Beginner
Beginner
Posts: 3
Joined: Tue Mar 28, 2006 1:46 am
Contact:

Syntax

Post by VictorKush »

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.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

OK, I get it. We're supposed to know that even if what you post in your question is wrong, you actually have it right on your site. Therefore, we should ignore those errors and look elsewhere for the problem.

Interesting concept...
John
Post Reply