Instant AJAX on your site

I went back to the music section, and redid the AJAX code I used. I remembered the Prototype library (prototype.js) I was using for the lightbox had its own AJAX object class – which was much more comprehensive than my implementation (error handling, browser support, etc).

I thought that since I was already using the framework anyways, might as well redo my functions altogether to utilize it. While the documentation had example codes, like any other site, I noticed that usually they always include a fixed “target” in the function. Meaning if you have a certain AJAX operation you wish to perform, the function usually took in the URL which you specify, but plugs it into a set target. While this is easily fixed, I was simply baffled as to why they don’t make it a standard to “assume” people would want at least to specify both the url and target as a default.

So I came up with code which I dubbed “InstA-JAX” to do just that. I’m sharing it here since I figured that anyone I know who is remotely interested in implementing rudimentary AJAX functionality might find it very useful as it doesn’t require them to “think” anymore hehehehe. – just plug it in, markup your HTML the proper way and you should be good to go.

Read More

FJAX

I guess everyone has heard about AJAX. Well I read an article on Digg about FJAX, which basically is the same thing, but attempts to cut some corners on the code by using Flash’s proven XML handling.

The logic behind it was that AJAX code can easily get bulky if you want to make sure it runs smoothly across different browsers. FJAX “solves” that dilemma [in a sense] by using limiting the JS to only to call on a Flash object and write it’s output on the document (while AJAX relies heavily on the JavaScript to do everything. The whole middle process of pulling, parsing, etc. is done via Flash – with few lines of code that is native ActionScript.

Read More