Yii widgets are very poorly designed when it comes to working with ajax calls that have elements that require additional scripts to be loaded.
The solution posted by bool.dev in the comments is my preferred way of dealing with this issue, but there are others as well, if that does not work for whatever reason (which appears to be the case for you).
In your primary view file (the one you call with render(), not partialRender()), including the following:
$this->renderPartial('_foo',null,true,true);
This will force your main page call (so, before the ajax calls) to include the scripts. Since the 3rd parameter is now true, it will return the contents as a string, which then gets discarded because we are not storing it anywhere.
Then for the ajax calls, use
$this->renderPartial('_foo',null,false,false);
or just
$this->renderPartial('_foo');
since the last 3 parameters are just the defaults.
This will prevent the scripts from being loaded multiple times, but still be present, since they are there on the original page load but not the ajax calls.
Depending on what is in your _foo view file you may need to make a special file. All that is required is the a dummy usage of the widget you want the script files from.
Remember, all you are trying to do is force the widget to run on the main page call so it registers its scripts, and then discard the remaining output. Then on ajax calls ignore all the scripts it registers by setting the processOutput parameter to false.