Archive for the 'ajax' Category

JavaScript Tricks And Good Programming Style

August 9th, 2006 by Alexander Kirk | Comments 42 Comments »

Note that this is an updated version. Original version can be found here. Thanks to the commenters I have updated this post with some better tricks. In a loose series I'd like to point out a few of them. As I am currently mostly programming in JavaScript, I will write most of my samples in [...]

JavaScript Tricks And Good Programming Style – Original Version

August 8th, 2006 by Alexander Kirk | Comments Comments Off

Note that there is an updated version I have been programming for about 10 years now, and I am always longing for improving my code. Throughout time I added a few habbits that I consider to be good practices and increase the quality of my code. In a loose series I'd like to point out [...]

Firefox 1.5, XmlHttpRequest, req.responseXML and document.domain

July 27th, 2006 by Alexander Kirk | Comments 3 Comments »

Recently I have been working on a web application, extending it with an iframe on another subdomain. When you set up communication with an iframe on another subdomain, it works by setting document.domain in both pages. Pretty nice and straight forward. But it can mess up the rest of your page. As soon as you [...]

Misuse of the Array Object in JavaScript

May 18th, 2006 by Alexander Kirk | Comments 4 Comments »

There is a very good post about Associative Arrays considered harmful by Andrew Dupont. The title is a bit misleading but correct. When coming accross a piece of JavaScript like this foo["test"] = 1; there is nothing wrong about it. It's the basic usage scheme of assoziative arrays. Or should i rather say objects? While [...]

A better understanding of JavaScript

March 2nd, 2006 by Alexander Kirk | Comments 3 Comments »

I've been working with JavaScript for years. It was my replacement for a server side language when I couldn't afford to buy web space in the mid-90's. Still, as the language becomes popular again, I recognized that I did understand the basics but there was much more to the language. digg it, add to delicious [...]

Better code downloading with AJAX

October 10th, 2005 by Alexander Kirk | Comments 3 Comments »

I've been playing with Code downloading (or Javascript on Demand) a little more. Michael Mahemoff pointed me at his great Ajaxpatterns in which he suggests a different solution: if (self.uploadMessages) { // Already exists return; } var head = document.getElementsByTagName("head")[0]; var script = document.createElement('script'); script.type = 'text/javascript'; script.src = "upload.js"; head.appendChild(script); Via DOM manipulation a [...]

Code downloading with AJAX

October 5th, 2005 by Alexander Kirk | Comments 4 Comments »

Earlier, I suggested to use Code Downloading in order to reduce the size of AJAX application. I left the term undescribed, but I will change this now: As JavaScript is an interpreted language, it is quite easy to load additional code, even after the application has "started". This means that only code absolutely necessary to [...]

Documenting prototype.js for AJAX

October 5th, 2005 by Alexander Kirk | Comments 5 Comments »

As the prototype.js library lacks documentation and I recommend to use the down cut version for AJAX, I thought it might be useful to document how to use the AJAX related functions. A "normal" AJAX callback When you just want to do a post-back to the server (for example to store some data the user [...]

prototype.js just for AJAX

October 5th, 2005 by Alexander Kirk | Comments 11 Comments »

Customized prototype.js for AJAX, small in size.

Rise of slow AJAX applications

October 4th, 2005 by Alexander Kirk | Comments 3 Comments »

Many AJAX applications overuse the new technology. Try using it at a reasonable degree.

Bloated Ajax Applications Due to Libraries

October 3rd, 2005 by Alexander Kirk | Comments 8 Comments »

The most used AJAX libraries take up quite considerable amounts of download volumen. Change that.