I don't use javascript for much so I'm pretty unfamiliar with it and hope someone can point me in the right direction.
I want to show/hide and enable/disable these menu option based on the users network login.
I have the users login in a variable (let's say it is "userlogon"). So for example:
1. If userlogon='Admin' -- then show the administration section of the menu. If userlogon<>'Admin' do not show the administration menu option (collapse menu down so there is no gap).
2. What if I wanted to show all options instead of hiding them? So -- all Administration menu is displayed regardless of userlogon -- but if userlogon<>'Admin' then the suboption1 & 2 are disabled?
Menu (in a div tag):
Ideas?
Thanks.
I want to show/hide and enable/disable these menu option based on the users network login.
I have the users login in a variable (let's say it is "userlogon"). So for example:
1. If userlogon='Admin' -- then show the administration section of the menu. If userlogon<>'Admin' do not show the administration menu option (collapse menu down so there is no gap).
2. What if I wanted to show all options instead of hiding them? So -- all Administration menu is displayed regardless of userlogon -- but if userlogon<>'Admin' then the suboption1 & 2 are disabled?
Menu (in a div tag):
Code:
<script language="JavaScript" type="text/javascript"><!--
var animMenu =
[
[null, 'Home', 'mainHome.asp', '_self', 'Main Page',
],
_cmSplit,
[null, 'Search', 'serviceSearch.asp', '_self', 'Search',
],
_cmSplit,
[null, 'Sales', null, '_self', 'Administration',
[null, suboption1, 'suboption1.asp', null, null],
[null, 'suboption2', 'suboption2.asp', null, null],
],
_cmSplit,
[null, 'Service', 'serviceSelect.asp', '_self', 'Service',
],
_cmSplit,
[null, 'Analysis', 'analysesMain.asp', '_self', 'Analysis',
]
];
cmDraw ('menuDiv', animMenu, 'hbr', cmThemeOffice, 'ThemeOffice');
--></script>
Ideas?
Thanks.