how to load dynamically listboxes when you click a link ??

I have never done ajax before, I need to create a page that show links :
link1
link2
..
linkn

when I click in a link two listboxes load dynamically from a database, when I click another link the data change in the two listboxes.

please could you show me how to do it using ajax.

my page is a jsp page.

thanks