How do I save a file generated by an OS X Dashboard Widget?

Posted by Weston C on Stack Overflow See other posts from Stack Overflow or by Weston C
Published on 2010-04-27T18:15:34Z Indexed on 2010/05/01 23:37 UTC
Read the original article Hit count: 232

I've got a web app that I'm porting to an OS X Dashboard widget. The web app generates some data on the client side using JavaScript, and then, when the user wants to save it, sends it to a server-side script which relays the data back with the Content-disposition: attachment; HTTP header, triggering a save-file dialog in most browsers.

I've tried duplicating this in the Dashboard environment. The Widget simply disappears. I don't know, but I suspect that it may be actually navigating to the unfamiliar content.

So, how do I trigger a "save file dialog" -- or, failing that, use any method at all to save the data the Widget generates as a file?

© Stack Overflow or respective owner

Related posts about osx

Related posts about dashboard