save file in javascript
-
First of all, your question not clear. But whatever be the case, you can not save a file with javascript. :sigh:
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
-
Hi... Sorry dat my question wasn't clear.... I don't mean to save file dat user has uploaded. I already have a file created, which i want to open in javascript, edit it and den again save it, without the user knowing wats happening. I tried using following , but this opens a save as dialog box. I dont want dat. function SaveFile() { var temp = "hi.. testing"; alert(temp); SaveFrame.document.open("text/html","create") SaveFrame.document.write(temp) SaveFrame.document.close() SaveFrame.focus() SaveFrame.document.execCommand('SaveAs',null,'testing.txt') } Here SaveFrame is an iframe. Hope i am clear now.. How to do this...
-
Hi... Sorry dat my question wasn't clear.... I don't mean to save file dat user has uploaded. I already have a file created, which i want to open in javascript, edit it and den again save it, without the user knowing wats happening. I tried using following , but this opens a save as dialog box. I dont want dat. function SaveFile() { var temp = "hi.. testing"; alert(temp); SaveFrame.document.open("text/html","create") SaveFrame.document.write(temp) SaveFrame.document.close() SaveFrame.focus() SaveFrame.document.execCommand('SaveAs',null,'testing.txt') } Here SaveFrame is an iframe. Hope i am clear now.. How to do this...
-
needhi_p wrote:
want to open in javascript, edit it and den again save it, without the user knowing wats happening
what are you trying to hack :wtf:
The Developer - CEH
:) trying to hack nothing... Actually i m making an audio player. In dat i want dat wen shuffle button is clicked, i want to change the order of songs in my m3u file. So for dat, i need to open it & edit it accordingly & then save it again with same name. Bt i want to do this without postback. So i want to do it using javascript...