B
barthelemy.von.haller
Hello !
I am having a problem which I thought was an easy one but which starts
to drive me crazy.
Imagine that I have a text displayed in a div. I would like a button
to download a text file containing this text (no formatting, just
text).
How should I do that ?
Can I somehow build a file in javascript and then propose to the user
to save it ? (the normal "save or open with" dialog)
Or am I forced to have a temporary file on the server to link to ? and
then wouldn't the browser simply display this txt file instead of
proposing to save it ?
Any help would be welcomed !
Thanks in advance
Barth
I am having a problem which I thought was an easy one but which starts
to drive me crazy.
Imagine that I have a text displayed in a div. I would like a button
to download a text file containing this text (no formatting, just
text).
How should I do that ?
Can I somehow build a file in javascript and then propose to the user
to save it ? (the normal "save or open with" dialog)
Or am I forced to have a temporary file on the server to link to ? and
then wouldn't the browser simply display this txt file instead of
proposing to save it ?
Any help would be welcomed !
Thanks in advance
Barth