load plugin with ajax [duplicate]

looking at the html output of the plugin code, i can say u that the plugin loads everything else (textarea and history) with javascript (see all those data- attributes and loading message). Now if the call to function was made on page load(non-ajaxy way), the plugin would have loaded requried javascript files and then things would look fine. But since the plugin function is called in an ajax request, plugin’s javascript isn’t loaded, only html is returned back, which is causing the problem..

Speaking generically, according to my limited exposure of wordpress, it wouldn’t be possible to load plugins via ajax (or atleast a major number of plugins). And if it is, i’ll be so very interested in seeing the approach 🙂