Smoke Signals

Wednesday, March 16, 2005

My First XMLHTTPRequest appish thing

What I wanted to do was create a dynamic list that can be used on my Rails CMS. Basically I wanted it to have top-level items and when clicked would use XMLHTTPRequest to call a script on the server that would return all the items sub-items and created a nested unordered list. That way only the data you wanted to see would be called when clicked and you could stylize it using css so it can look like a menu system or a folder tree. Well, it took about 2 hours and here it is in its pre-refactored uglyness: Dynamic List

Special thanks to Nick Chapman for pointing me in the right direction for doing html entities in javascript and using his XHTMLHTTPRequest code :)


Post a Comment

<< Home