AJAX: How do *you* use it?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
themurph
Forum Commoner
Posts: 76
Joined: Wed Apr 19, 2006 1:56 pm
Contact:

AJAX: How do *you* use it?

Post by themurph »

I've been playing around with XMLHttpRequest as of late, and have found
it quite useful for doing auto-database-lookup form field population. Pretty
cool stuff :) I've been trying to think of other ways to use it in my enviroment.

How are you (yes, you) currently using ajax-ish stuff on sites?

And which libraries do you use, if any? (like sajax or pear html_ajax, etc)

Cheers
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

I've messed around with it .. I've got a 75% complete photo gallery thing that uses it .. but I don't think I'd ever use it on a real website .. it's just too much hassle getting it properly accessible.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Used it for various things. We have sessions that time out after a defined length of time (15 mins by default). We do however have AJAX keep the session active if the user is working.

It's useful for auto-saving too. Generally I use it for things that would still work if you took it back out.

One really cool thing I've implemented it in is exception handling in JavaScript. Sometimes you get nasty little bugs with things like JS that crop up on certain minor versions of browsers or unusual browsers. Using window.onerror and XMLHttpRequest we can log anything that's not syntax related into a database and keep on top if these "niggles".

I started writing something called phpMyAjax that I actually put on SF but haven't really continued far with it. It was the equivalent of the command line MySQL client but with ANSI-appearance colors and written in JavaScript :) Maybe I'll have another play with it again - it needs some major refactoring before I can feel happy with it.
User avatar
ok
Forum Contributor
Posts: 393
Joined: Wed May 31, 2006 9:20 am
Location: The Holy Land

Post by ok »

http://developer.mozilla.org/en/docs/AJAX is the best resource for HOW, WHEN and WHY to use AJAX!
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I use it for a calendar/date picker script I wrote. I also wrote a chat program (as did ~Burrito) that uses it pretty extensively.

I like using it to provide bells & whistles - like ~d11wtq said - stuff that you can take out.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply