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 :)

Written on March 23rd, 2006 , Uncategorized

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…

Written on March 4th, 2006 , Uncategorized

SirSpanky.com – The Secret Diary of James Pearce Aged 20-Something is proudly powered by WordPress and the Theme Adventure by Eric Schwarz
Entries (RSS) and Comments (RSS).

SirSpanky.com – The Secret Diary of James Pearce Aged 20-Something

Personal jorunal of a professional geek – James Pearce in Perth, Australia