1 posts in topic
Flat View  Flat View

Posted By:   m_b
Posted On:   Tuesday, April 8, 2003 01:32 PM

I am trying to utilize cookies to dynamically display links on a page. I have stored a user ID (obtained from a URL) in a cookie. For example, I want to restrict someone with less privileges from accessing some links while others will get to see more links. This will be on a intranet company webpage, is there anyway of doing this????? Thanks for any help.

For example:

I get "John Smith" from the URL. He is a manager, so has access to all sites. Can I write a script that will only take John Smith to sites while blocking others with less authority from having access?

Re: HELP!!!

Posted By:   Nitesh_Naveen  
Posted On:   Wednesday, April 9, 2003 03:47 AM

you need to restric accessing selective links!!! Well two ways of doing it.

1. Use document.write to put these links on the page. You can get the cookie value and check the access and write only those links for which the user has access to.

2.call a javascript function in the link instead of the url. for eg. u can have the link as
and in the function based on the access flag you use
function fetchMyUrl(accessFlag,myUrl){
You'll probably need to build/maintain an array of acccess flags for the urls as per the user rights in the page.
About | Sitemap | Contact