Archives

A YUI Loading Panel Widget

Posted on January 17, 2008
Filed Under Javascript | 51 Comments

Probably needless to say, but here it is. A web page which is processing a lengthy Ajax request and doesn't provide a loading indicator of any kind will mostly mislead the user to think that the page has stopped responding. So the solution? Use a loading indicator of course. Here's a very handy loading indicator widget for Ajax programmers who use YUI.

Files

<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.4.1/build/assets/skins/sam/skin.css">



</link>

How to Use

First, create a new instance of loading panel. After that, you can call show or hide method on the loading panel object.

var loadingPanel = new yuiLoadingPanel();

//loadingPanel.show();
//loadingPanel.show("Processing...");
//loadingPanel.hide();

The user can close the loading box by clicking on the cancel link. If you want to handle this situation, you can subscribe to the cancelEvent:

loadingPanel.cancelEvent.subscribe(function(e, a, o){
  alert('You clicked cancel!');
});

Read more »

Apache Performance Problem on Vista

Posted on January 4, 2008
Filed Under Server-Side | 4 Comments

Just switch my operating system to Vista, and my biggest complaint about it is that it breaks my Apache HTTP server. The server still runs, but very slowly. The symptom is as follow: every time I reload a web page from the browser, there usually is a 2-3 seconds delay before the loading sequence starts. This shouldn't be happening because I serve all my files locally, so I expect no delay at all. Also, this behavior does not occur in XP.

After some excessive searches, I found a forum post (forgot the URL, will update this when I hit the site again) that suggests uninstalling Zone Alarm will resolve the problem. I gave it a try since I was in nowhere in solving the problem. Surprisingly the uninstallation did cure the delay issue of Apache. Beware that you HAVE TO restart Vista after uninstallation, otherwise you will not see the changes.

That's right, I uninstalled my firewall. So replacement? I like Zone Alarm and enjoy using it, but it doesn't seem to be very stable on Vista. However, I've found another great firewall product, Comodo Firewall Pro, which is a commercial grade firewall free of charge.

The Five Most Precious Firefox Extensions for Web Developer

Posted on January 3, 2008
Filed Under Web Related | 2 Comments

I develop web applications and test them in Firefox, for Firefox provides many extensions that are not only useful, but sometimes vital to the completion of my projects. Over a period of time, I have been continuously evaluating different Firefox extensions in attempting to sort out the valuable ones (for web development). At last, I come up with these five.

Read more »

YUI Based Lightbox – Final

Posted on January 1, 2008
Filed Under Javascript | 43 Comments

My previous YUI implementation of the lightbox, which was released for beta evaluation, now has nearly gone gold. This page will be devoted for upcoming updates and bug fixes. So if you've found any bugs, feel free to report them in the comment section of this post.

Also, I would like to thank many who reported bugs and gave feedbacks after the release of previous image lightbox. As many have requested, I implemented navigation for the new lightbox. In addition to the navigation, numerous new features have been added and bugs have been fixed.

yui-gallery-ss1.gifyui-gallery-ss2.gif

Read more »

Source Line of Code Counter

Posted on December 26, 2007
Filed Under C# | 9 Comments

Since I couldn't find a SLOC (source line of code) counter that satisfies me, I decided to write one. This SLOC counter equipped with a file system browser which is very handy for precisely defining inclusion and exclusion of files/directories. Besides that, the SLOC counter supports pattern matching for file inclusion and exclusion, and directory inclusion using regular expression. The usage section of this post has a detailed list on how to use pattern match.

This LOC counter is written in Visual C# 2005. That means you need Microsoft .NET Framework 2.0 to run this program. You can download a free copy of .NET Framework from here.

Read more »

Page 5 of 9« First...34567...Last »
Code Central Special

Polls

  • Tell us who you are:

    I am a...

    View Results

    Loading ... Loading ...