I am not sure if I understand your question, but I guess you have a problem with javascripts loaded more than once or processing javascript on AJAX requests. That’s a frequent problem. First, if a AJAX request renders another widget than you may need to run processOutput() by setting the fourth parameter of renderPartial to true:
If subsequent requests reload javascripts again and again although they are already loaded you may use clientScripts scriptMap property to prevent reloads:
Third hint: Always assign your own ids to your widgets as Yiis auto id generator won’t take partially rendered widgets into account leading to weird results that are hard to debug.