What parts of Moodle do you know that already do Ajax? (Hint, try rating this forum post). How does that existing code work?
General developer forum
Writting own AJAX class
This discussion has been locked so you can no longer reply to it.