Gossamer Forum
Home : Products : Gossamer Links : Discussions :

login/out on static page for other items

Quote Reply
login/out on static page for other items
The javascript code for managing login/out link on static pages works fine. But I seem to have problem adding additional links such as if a user is logged in, display a link "edit my links" on static page, otherwise, hide the link.

I tried adding something within the <span id=loginbar> </span> code. It didn't work.

Can someone please give me some hints.

Thanks.
Quote Reply
Re: [long327] login/out on static page for other items In reply to
You need to change the javascript in include_common_head.html to do whatever you want it to do. If you id your link, you could do something like:
document.getElementById('mylinkid').style.display = 'inline';
where you link is:
<a href="#" id="mylinkid" style="display: none">foo bar</a>

Adrian
Quote Reply
Re: [brewt] login/out on static page for other items In reply to
Hi Andrian,

Thanks for the code. It actually works, but in the wrong way. It display my links when a user has not logged in and hides the links when one's has logged in. How can I modified it to make it behave accordingly?

Long