PHP/JSON: A working example – log update on a background process (Part 2/2)
PHP side (Server side)
On the server side, here is the code for the start_proc.php which starts a background process Read more 
Ajax/Prototype/JSON PeriodicalUpdater: A working example – log update on a background process (Part 1/2)
This blog shows a real working Ajax.PeriodicalUpdater example (not just a hello world or non stop show timer). The example uses the PeriodicalUpdater to display a constantly updated log file from a background process running on the webserver. When the process finishes, the PeriodicalUpdater stops itself. Also a simple short PHP script is shown how to launch and check the status of a background process. Read more 
How to use CSS SyntaxHighlighter 2.0 with Ajax/Prototype
The default method to use SyntaxHighlighter 2.0 is via SyntaxHighlighter.all() declared in the Javascript section of the main page. What this method does is to register the SyntaxHighlighter.highlight() to call when the main page is loaded. The highlight method then searches for all the <PRE> tags (default configured tag name) and checks any class names containing the ‘brush:’ keyword. If so, then proceeds with syntax highlighting. Read more 
CSS SyntaxHighlighter 2.0: Notes on using with TEXTAREA and PRE
The CSS SyntaxHighlighter 2.0 can be used with <pre> or <textarea> tags. However if you have to use with <textarea>, you may have some little surprise that it won’t be <textarea> anymore once the content is highlighted. Because the highlighter will replace the DOM node (same applied to <pre> tag) – according to the source code SyntaxHighligher.sh.highlight( ) in shCore.js. You will get a new <div> node instead – that’s the only way to have colorful syntax highlight on your page. Read more 
Ajax: a simplified version of file upload form using IFRAME
I have been trying to create file upload form in Ajax. Most of the tutorials I found are using <IFRAME> technique as a hidden frame. In OpenJS, it gives an excellent tutorial. In a nutshell, the file upload form redirects the reload action into the hidden frame. Then uses the top window to fetch the results (using JSON) when the hidden frame is loaded which indicates a file has been uploaded. This technique involves setting up the onload and onsubmit event handlers while the main page is loaded.
However, my scenario is slightly different that the <DIV> box in my page is inserted dynamically with different forms, like Ajax.Updater(‘action_box’, ‘action_form.html’), during the users navigation. So that I cannot rely on setting up onsubmit and onLoad event handlers when the main page is loaded. Here is a slightly modified and simplified version of the one in OpenJS to cater for this scenario. It is imperative that you understand the OpenJS tutorial first. Read more 
Prototype/Ajax: workaround to serialize forms with multiple submit buttons
I have started learning to use Prototype (Javascript client framework) for a few days. So far I found it very good and saved me a lot of my work in developing webpages. Then I hit an existing bug when Prototype serializes a form with multiple submit buttons. Prototype always serializes the first submit button, even if you click the second button. Read more 





You can mess up the access mode of a file if you do a ‘chown -R’ or ‘chmod -R’ over the wrong directory. Well, I did!! This will screw up the setuid bit which can lead to permission problem on some essential utilities, such as mount, dhclient, etc. 