Skip to content

Archive for


Using Ajax.PeriodicalUpdater to update Flotr graph in both Ajax Window (pop-in) and child browser window (pop-out) simultaneously on IE8

This article describes how to use Ajax.PeriodicalUpdater and Flotr to plot a graph inside Ajax Windows and browser windows (IE8). The same continuous graph that can do ‘pop in’ as an Ajax Window and ‘pop out’ as inside a browser window. Throughout the article, I am using Prototype-UI for creating Ajax Windows, ie all the tools used in here are based on Prototype.

Plotting graphs within Ajax windows is easy. However, drawing graphs between Ajax windows and standalone browser windows requires a bit more understanding on both Flotr and IE8. I will show you and explain what went wrong in the first approach that has only worked on Safari and Firefox but failed on IE8 and came up with a second approach which worked in all browsers. Read more »


Note on changing Ajax.PeriodicalUpdater parameters

Sometimes you may have a Ajax.PeriodicalUpdater object running in the background and you need to change the parameter of the page.

To do that, simply change the Ajax.PeriodicalUpdater.options.parameters field, not AjaxPeriodicalUpdater.parameters.

var pu = new Ajax.PeriodicalUpdater(element, 'page.php',
                      { method: 'get',
                        parameters: { arg: val, arg1: val1 }
pu.options.parameters = { arg2: val2, arg3: val3 };

Don’t assign options.parameters directly with query string. Do the following instead:

var qstr = "arg2=val2&arg3=val3";
pu.options.parameters = qstr.toQueryParams();

Quick tutorial on how to create a FreeBSD system startup script

The init system of FreeBSD is quite different to the Linux. There is no concept of symbolic link of the init script to each run level and no run level. All you have is one big long list of init scripts and very simple way to administer these scripts. If you want some further readings, check out the original paper on rc.d system.

Here is a short tutorial, hopefully someone will find it useful. If you need to know more in depth, check out the FreeBSD document Read more »


Quick steps on setting up Apache + SSL + PHP + JSON on FreeBSD 8.0

There are many webpages that offer comprehensive information on setting up Apache on FreeBSD, such as However, I can’t find any tutorial just list the quick steps to get me going in minutes. So here is one. Read more »