I created an example database and step-by-step instructions on how to utilize the built-in Ajax features in xPages. You can download the sample and read about it here:
http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7FUJ67
Regards,
John