Archive for the 'JavaScript and AJAX' Category



Simple AJAX Module

Before you can start doing any cool stuff with AJAX you have to have the asynchronous data transfer part figured out.
This is a simple module I’ve used in a number of applications. It’s lightweight, and creates a transfer object without resorting to browser detection which gives it a fair shot at working with future versions [...]

When I wrote the originial post about this topic, I had written a quick and dirty function as an experiment. As is the case with most programming, another solution became apparent after digesting the problem for a period of time. So here is a modified solution to the problem:
function toggleCol(strCol){
var ths = document.getElementsByTagName(”th”);
var tds = [...]

Here is a little JavaScript function I whipped up last night. I’m working on a large loan-processing site, and thought it would be nice to be able to hide certain columns when viewing lots of loans on the same page. Here is the function:
function hideCol(strCol){
var ths = document.getElementsByTagName(”th”);
var tds = document.getElementsByTagName(”td”);
for (idx in ths){
if (ths[idx].className [...]