website tracking
Logo
Japan
 
My Photo
Name: James Pearce
Location: Perth, WA, Australia

Powered by Blogger

AJAX: Meet Sitepoint
Thursday, March 23, 2006
Cha-Ching! Todays heads up goes to SitePoint, who have the most flexible method I've seen to construct an xmlHTTPRequest object in Javascript. It allows to return the content text raw, or pass off the content as a paramater to another Javascript callback module.

Naturally, I had to modify the code so that I could pass more than just the XML response text as a paramater to the callback function, but hey, it was better than any other example I found out there!

If you don't know about XMLHttpRequest, it's similar to an IFRAME in that it allows a browser request without refreshing the page. Very useful for making live web apps, when most of the information needed is on the server...much nicer experience :)

PHP4 OO Note
Saturday, March 4, 2006
PHP4 with classes, quick note: if you want to reference class variables within a method, you MUST use $this->$classvar, not just $classvar. Unlike C , PHP4 does not need variables declared before you use them. So when you assign a value to a variable in a method, thinking that it is the classvar that you are assigning to, it will actually create a local instance of the variable instead...