Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [Andy] ajax rating system: Edit Log

Here is the list of edits for this post
Re: [Andy] ajax rating system
I only had an error in Firefox, but I figured out what was causing the error, I just don't know why:

Code:
<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(/^\s*<%config.user_cookie_prefix%>s=[0-9a-f]{32}\s*$/)) {
loginlink.href = '<%config.db_cgi_url%>/user.cgi?logout=1';
loginlink.className = 'in';
loginlink.firstChild.nodeValue = 'Logout';
break;
}
}
});
//]]>
</script>


This login/logout javascript somehow messes up the AJAX part of the rate script, but only in firefox. If you know why it does this or how to rewrite the code, let me know.

Thanks,

- Jonathan

Last edited by:

jdgamble: Jun 6, 2009, 10:48 AM

Edit Log: