[dev] Dynamic sidebar menu elements not refreshing

Rick Emery rick at emery.homelinux.net
Fri Nov 5 19:54:31 PST 2004


I decided to start a new thread with a subject that makes sense for the
archives.

The folder list in my sidebar stopped updating about a week ago. I saw that a
user preference was added a couple of months ago to handle the update interval
(I follow the CVS list and updates pretty closely; don't know how I missed
this), but it was set with the default of every 5 minutes. So, I viewed the
source of the frame and saw this at the bottom:

<script language="Javascript1.5" type="text/javascript">
var MenuUpdateHandler = {
    onLoad: function(result)
    {
        // Run the javascript we got back.
        eval(result);
    }
};

function update()
{
    var client = new HTTPClient();
   
client.init("https://www.emery.homelinux.net/horde/services/portal/menu.php?httpclient=1");

    try {
        client.asyncGET(MenuUpdateHandler);
    } catch (e) {
        // Don't do anything on errors; probably a transient failure,
        // and we'll try again after the next interval.
    }

    // Schedule the next update.
    window.setTimeout('update();', 300 * 1000);
}

// Update the menu if set in user prefs.
      window.setTimeout('update();', 300 * 1000);
</script>

I went into my preferences and changed the interval from the default 5 minutes
to 1 minute. After that, the source was identical, except the "300 * 1000"
entries were changed to "60 * 1000", but still no updating. I've included the
segments of the source above in the hope that somebody will see what's causing
my system to not update, because I don't get it.

By the way, the javascript to collapse/expand the sidebar works as expected,
and there are no errors logged in my firefox javascript console (the sidebar
fails to update in firefox, konqueror, and IE).

Thanks,
Rick
-- 
Rick Emery

"When once you have tasted flight, you will forever walk the Earth
 with your eyes turned skyward, for there you have been, and there
 you will always long to return"
                                              -- Leonardo Da Vinci



More information about the dev mailing list