XPages...How can I run client-side javascript after a partial refresh

I currently have an XPage that contains two tables (I’ll call them Table1 and Table2). I added a javascript function to XSP.addOnLoad to apply proper styling to the tables. When I click on a row in Table1, I do a partial refresh on Table2 to filter its contents. The problem is that after the partial refresh, Table2 loses it’s style. I can’t figure out a way to fire client-side javascript after the partial refresh. Any ideas?

Subject: Maybe…

I have avoided using the Dojo stuff in favor of jQuery and have found that calling specific functions either from the calling object (like a button) or embedding the code into the XPage itself via an output script has worked for me.

Subject: …

Thanks for the reply. Can you elaborate on my options please? I just started learning javascript over the course of the past week.

Subject: More info…

This post tells how to create an Output Script control in an XPage: http://www-10.lotus.com/ldd/nd85forum.nsf/5f27803bba85d8e285256bf10054620d/ec8a3779040928c085257553007a6c3a?OpenDocument

These controls can be made visible and invisible based on conditions or can be visible all the time.

Inside the control you can add JavaScript code that will run as the page is loaded. If you are able to come up with the necessary JavaScript to do what you ant, you can place that script inside the source of the script control and it will run when the page is partially refreshed.

Subject: Thanks for the help…got it working

Not sure if this is exactly what you meant, but this is how i got it to work. I simply put a block of script underneath the table tag. When the table gets refreshed, the javascript runs perfectly every time.

Thanks again for the help.