Why is XML Such a Pain in JavaScript?

Why is it that when one tries to parse some fairly simple xml: <placemarks> <placemark> <name>Placemark 1</name> <latitude>-79.00</latitude> <longiude>42.00</longitude> </placemark> <placemark> <name>Placemark 2</name> <latitude>-129.00</latitude> <longiude>43.00</longitude> </placemark> </placemarks> For example, iterating through all the placemarks and extracting the names, lats and longs using javascript is a very tedious affair. In fact, I’ve found it almost pointless […]

Zend Framework, FireBug, FirePHP and Debuggin’

I finally got around to implementing some debugging my applications. By debugging, I mean something more useful than random ‘echo’ and ‘exit’ statements littering my code. I found a nice post by Christoph Dorn with a few nice pointers on how to integrate FireBug and FirePHP using Zend_Log and Zend_Log_Writer_Firebug. My only addition was the […]

Using __call() in your controller to render magic content.

I was writing a basic CMS-type system and I was getting a bit annoyed with long urls, ie: /index/content/page/something, when I really just wanted /content/something – so I thought to myself, “self, why don’t you use __call() and just magically handle the incoming actions? Well, self, that was a brilliant idea. function __call($method, $params) { […]

Posting Defaults for Checkboxes

I was playing around with Zend_Form a little while ago and I realized they did something neat with checkboxes. Everytime I created a checkbox, Zend made two. <input id=”optInDefault” name=”optIn” type=”hidden” value=”n” /> <input id=”optIn” name=”optIn” type=”checkbox” value=”y” /> One hidden, and one not.  This is handy because when the user doesn’t check it – […]