[CS-FSLUG] Ajax

Chris Brault gginorio at sbcglobal.net
Fri Jun 16 21:05:59 CDT 2006


I'm just curious,

I'm starting to use Ajax in some of my pages to perform tasks usually 
handled by PHP or by CSS. Of course, it is my contention that somethings 
are done best in javascript, some in CSS and some in PHP (or python or 
perl).

As one example of something that neither PHP nor CSS can do (we'll 
pretend that frames don't exist for the moment):

http://69.65.27.131/~mexicana/

This is just an example page I am using. The links don't work, but the 
mouseover events do. In usage, I can load pages on demand when there is 
a "onmouseover" event in javascript. That way the client can edit 
ordinary HTML in whatever client they choose. The center area, where the 
text changes, are actually HTML files loaded on demand using the 
XMLHttpRequest (or MS equivalent ActiveXObject(Msxml2 ... blah,blah, 
complicated blah).

Here are some of the issues I've discover right off the bat:

1) Loading pages dynamically using AJAX methods does not populate the 
BACK button on the browser.
- Yahoo! maps and Google load invisible iFrames with header data to 
populate the back buttons ... sounds like a hack to me.
+ I chose PHP (include).

2) You can't bookmark pages.
- This was a real sticking point for me. The site includes a full 
featured glossary. Being able to bookmark a particular building or 
architectural item seems like a key feature of such a site.
+ Once again, using PHP (include) with the GET method does the trick.

3) Operating System and Browser compatibility.
- Oy! There's IE5 and IE5.5 SP1 (things done one way), there's IE6 
(things done another way, there's IE7 (almost actually works) and then 
there's mozilla based browsers (and Konq based browsers) and Opera. 
Makes my head hurt just thinking about it.

Anyone else working with Ajax?

Gabe Ginorio




More information about the Christiansource mailing list