I want to implement dynamic, client side file generation in javascript. Is it possible? For example, a user pushes a button and the script suggests to download the generated file.
Not possible without a server side script that will return a response of the proper mime-type.
It depends a bit on what kind of file. You can generate an HTML file by opening a window and writing to it; the user can then download it via File | Save As on most browsers.
A text file can be generated and loaded into a textarea
element, and then the user can either manually copy the file, or there are various ways to copy it to the clipboard (you could even keep the textarea
hidden and just offer the copy button). Search for "javascript clipboard" for various ways to do that; here's one of the first lnks that comes up for that part of it.
Binary files will probably need to be handled server-side.
You can always use FSO to generate a text-oriented (binary won't work) file on the client's computer, return the link and download it.
Be aware that it will only work for IE (ActiveX) and you will be asked for more security rights.
Good luck.