A Compilation of YUI Callback

I have been coding JavaScript with YUI for quite a while now. Still, I am consistently confused by various callback functions in YUI. The thing that troubled me the most was the parameters those callback functions take. The API documentation does not provide any information about this. For example, if you go to YAHOO.util.Event, under addListener method, the description for parameter fn as follow: <Function> The method the event invokes.

Yes, it's a straightforward description, but it doesn't help too much. What I really need is the signature of this callback function. For the purpose of my own use, and to benefit the community, I decided to make a compilation of callbacks in YUI.

Continue reading

The Missing Parameter of jQuery.post

When coding JavaScript that requires a lot of DOM manipulations, jQuery no doubt is my favorite JavaScript framework. Surprisingly, with file size of 26KB (packed distribution), it supports Ajax along with many other handy features.

If you've previously used jQuery's Ajax API, you probably noticed that there's a jQuery.getJSON() function call that grabs the server response from a given URL and parses it into a JSON object. However, you couldn't find the corresponding method from online documentation for post request, namely jQuery.postJSON.

Continue reading