Possible Duplicate:
Force download of ‘data:text/plain’ URL
Create a downloadable link from a vriable in javascript
I have seen plugins that can create/generate files (.txt, .pdf, .vcard) and I'm not exactly sure how it's done. Are these done through Ajax? Or is there an object/method I'm missing?