I have created widgets for my website(xyz.com), which can be embedded in different websites. Let's say I embed a widget which is a photo album, in another website, abc.com. The content is residing on xyz.com but is pulled via Javascript into abc.com.
Will the content generated by the widgets (Javascript) on abc.com will be indexed by search engines?
Google will not index anything that is not visible when a page is loaded with JavaScript disabled.
There is more information in this similar question: google indexing text retrieved by ajax or javascript after page load
Also, you can test what Googlebot 'sees' by using the "Fetch as Googlebot" feature of Google Webmaster Tools.
If you want Google to index your Ajax, you can read Google's recommendations here: http://code.google.com/web/ajaxcrawling/docs/getting-started.html