Re: Saving dynamically created data on client side?
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Fri, 21 Aug 2009 08:39:58 +0200
HaJo wrote:
On Aug 20, 10:31 am, HaJo <hajo.sch...@xxxxxxxxx> wrote:
I have a client-side javascript running, the user creates some data.
At a point the data should be saved to his HDD -- I.e. a "Save as...".
Tnx guys for your help here, I did indeed find a satisfactory solution
now. The main pointer came from Thomas:
I assemble the data in JS in a form field. I then submit this to a
server CGI which immediately returns it with Content-type & Content-
disposition correctly set. No need to pop up a window or similar
workarounds, the browser accepts it and keeps the original page
untouched. Beautiful!
You are welcome :) But AISB, as you have server-side scripting to do it,
you should consider making an effort to have that working without
client-side script support at all, so that your application does not break
if for some (probable) reason client-side scripting is unavailable. That
could be as simple as having the server generate, in that event, the form
with the appropriate `input' elements filled in.
PointedEars
--
Anyone who slaps a 'this page is best viewed with Browser X' label on
a Web page appears to be yearning for the bad old days, before the Web,
when you had very little chance of reading a document written on another
computer, another word processor, or another network. -- Tim Berners-Lee
.
- References:
- Prev by Date: Re: Saving dynamically created data on client side?
- Next by Date: Re: Modifying "floating menu" freebie code to work within a container
- Previous by thread: Re: Saving dynamically created data on client side?
- Next by thread: Irregularities in Regular Expressions
- Index(es):
Relevant Pages
|
Loading