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.