I don't think you are trying. There is a whole sub-forum here devoted to Ajax and Design. As devnull69 says, "Please take a look at the thousands of examples you will find on this forum as soon as you search."
See also http://www.hunlock.com/blogs/AJAX_for_n00bs
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.