Create client side javascript file
3 answers
It depends on which file. You can generate an HTML file by opening a window and writing it; the user can upload it via File | Save as in most browsers.
A text file can be generated and loaded into an item textarea
, 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 it textarea
hidden and just offer a copy button). Search for "javascript clipboard" for different ways to do this; here is one of the first lnks that fit this part.
Binaries may have to be handled on the server side.
+1
source to share