here is a tutorial i followed that covers the basics of AJAX