Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Need SOme Help With The Dynamic Log In on Static

Quote Reply
Need SOme Help With The Dynamic Log In on Static
Hi:

Using Java to add a Log In or Log Out on static is a great idea. Unfortunately, I seem to be missing something on my static pages- I am getting just a "Log In" even if I am logged in!

I have this in the header:

Code:

<%if not d and not user.Username~%>
<script type="text/javascript" src="<%config.build_static_url%>/utils.js"></script>
<script type="text/javascript">
//<![CDATA[
registerEvent(window, 'onload', function () {
var loginbar = document.getElementById('loginbar');
if (!loginbar)
return;
var loginlink = loginbar.firstChild;
if (loginlink.className != 'out')
return;
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
if (cookies.match(/<%config.user_cookie_prefix%>s=[0-9a-f]+/)) {
loginlink.href = '<%config.db_cgi_url%>/user.cgi?logout=1';
loginlink.className = 'in';
loginlink.firstChild.nodeValue = 'Logout';
break;
}
}
});
//]]>
</script>
<%~endif%>


And <script type="text/javascript" src="http://www.bcdb.com/cartoons/static/utils.js"></script> is in the header, and the file exists. So I THINK that part is fine!

So, in the page, I have:

Code:


&nbsp;&nbsp;<a href="<%config.db_cgi_url%>/user.cgi<%if user.Username%>?logout=1<%endif%>" class="<%if user.Username%>in<%else%>out<%endif%>"><%if user.Username%>Logout<%else%>Login/Register<%endif%></a>


WHich I think is right... but probably I am missing something.

Well, I just get Login/Register, even when I am loggen in when I check.

What am I missing????
dave

Big Cartoon DataBase
Big Comic Book DataBase
Subject Author Views Date
Thread Need SOme Help With The Dynamic Log In on Static carfac 5812 Apr 24, 2005, 3:56 PM
Thread Re: [carfac] Need SOme Help With The Dynamic Log In on Static
brewt 5657 Apr 24, 2005, 4:20 PM
Post Re: [brewt] Need SOme Help With The Dynamic Log In on Static
carfac 5686 Apr 24, 2005, 4:46 PM
Thread Re: [brewt] Need SOme Help With The Dynamic Log In on Static
Clint 5616 Oct 19, 2005, 12:48 AM
Thread Re: [Clint] Need SOme Help With The Dynamic Log In on Static
brewt 5648 Oct 19, 2005, 1:05 AM
Thread Re: [brewt] Need SOme Help With The Dynamic Log In on Static
Clint 5617 Oct 19, 2005, 10:04 AM
Thread Re: [Clint] Need SOme Help With The Dynamic Log In on Static
brewt 5618 Oct 19, 2005, 11:30 AM
Thread Re: [brewt] Need SOme Help With The Dynamic Log In on Static
meta500 5618 Oct 22, 2005, 6:32 AM
Thread Re: [meta500] Need SOme Help With The Dynamic Log In on Static
Clint 5553 Oct 23, 2005, 10:15 PM
Thread Re: [Clint] Need SOme Help With The Dynamic Log In on Static
meta500 5531 Nov 7, 2005, 8:23 AM
Thread Re: [meta500] Need SOme Help With The Dynamic Log In on Static
brewt 5564 Nov 7, 2005, 3:48 PM
Post Re: [brewt] Need SOme Help With The Dynamic Log In on Static
meta500 5462 Nov 8, 2005, 5:12 AM
Thread Re: [brewt] Need SOme Help With The Dynamic Log In on Static
Jag 5503 Nov 8, 2005, 9:51 AM
Post Re: [Jag] Need SOme Help With The Dynamic Log In on Static
brewt 5477 Nov 8, 2005, 1:17 PM