I dont really get what you're saying here, but however, first try to
user your web framworks ajax utilities. Tapestry, Wicket, WebWorks and
other's have some utilities as I know.
Then if you have more needs, go for the open JavaScript API's on the
web, like Dojo (http://dojotoolkit.org), Scriptaculous
(http://script.aculo.us) and others.
Maybe if you post your exact problem, we could help more.