Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:25

Change menu at login


Poster: johns
Dated: Friday November 18 2005 - 10:26:20 GMT

Can anyone help

I want to add items to the menu based on whether the user is logged on. Elsewhere I found the helpful suggestion to create in data_menu.js:

Code:
var userloggedon = false;


and then use the expression:

Code:
if (userloggedon) aI(".....);


This works a treat but I don't know how to set userloggedon = true from the logon data. My site uses asp, so I might have expected to use an expression like:
Code:
var userloggedon = false;
if iBBSLogonType = US_Registered then userloggedon = true;


where iBBSLogonType has already been defined by the login script.

But that doesn't work as a javascript expression! Any ideas?? many thanks
http://www.bluntishambaptist.org/forums

Sorted!


Poster: johns
Dated: Friday November 18 2005 - 14:26:08 GMT

Solved it:
Code:
<% if iBBSLogonType = US_Registered then %>
aI(".....")
<% end if %>

No need to create another variable just used the asp code for the login but didn't know how to do the <% %> bit. Like most things, it's obvious when you know how! Thanks Kevin3442: http://www.milonic.com/forum/viewtopic.php?t=5980&highlight=login

I assume this is good code! It certainly works!