Generating and saving/downloading files with only javascript

icorseUnrerge

New Member
I made a map editor for my game, the code is generated to a div with id "code". I am wondering how to generate a javascript file with this code. Obviously i have to get the text of the code div. \[code\]var code = $("#code").text();\[/code\] will work. But now i want to generate and download javascript file with this code. Is it even possible to generate/download a file with only javascript or do i have to use php?I want to choose the folder and the name manually.
 
Back
Top