Login Register

ajax div call a function each load

I have an ajax div that is loaded with the page returning all records in a table. I have a form with 3 fields to filter the results. The form submits each time a field is changed and updates the div with the new filtered results for "live" filtering. My div has executeScripts="true" and will execute a simple alert('I worked!') when it loads the first time with the page. It won't work on any subsequent loads. I need a function to fire after the div is fully loaded so it will have access to the DOM elements of the generated list. I've tried dojo.event.topic.subscribe and afterLoading="myfunction()" and can't get the desired results. How can I get a function to fire each time?

Thanks,
Traigo