Change menu at login

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
johns
Beginner
Beginner
Posts: 8
Joined: Mon Aug 01, 2005 11:44 pm
Location: Cambridge UK

Change menu at login

Post by johns »

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: Select all

var userloggedon = false;
and then use the expression:

Code: Select all

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: Select all

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
johns
Beginner
Beginner
Posts: 8
Joined: Mon Aug 01, 2005 11:44 pm
Location: Cambridge UK

Sorted!

Post by johns »

Solved it:

Code: Select all

<% 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://milonic.com/forum/viewtopic. ... ight=login

I assume this is good code! It certainly works!
Post Reply