T
The Natural Philosopher
Its not really javascript, or php, or HTML..so excuse posting it here.
I have a form.
On submission it submits to itself, so the normal behaviour is to pass
the data back to the server, do something server side, and redraw itself
with the exact data it had before it was submitted.
Nothing new there.
However one option was to instead of drawing itself, send a downloadable
object: To this end, serverside, instead of sending an updated HTML
version of itself, it sends some headers, and some data as a file
download. And that is ALL it sends.
Now I would have thought that this would in some way cancel the existing
window with the form in it, but it seems that all the browsers I have
tested against take this response - a file rather than an HTML document,
being sent, as a directive to spawn a separate download dialogue box,
and eve the main screen unaltered.
This is in fact exactly what I wanted, and saves me the trouble of
working out how to split the session into two browser windows - getting
the main window back and having a download happen, but can I rely on this?
Is it guaranteed behaviour to some standard, or just 'the way
firefox/safari/IE7 work'?
Apologies for asking here, but I don't even now where to LOOK for the
answer.
I have a form.
On submission it submits to itself, so the normal behaviour is to pass
the data back to the server, do something server side, and redraw itself
with the exact data it had before it was submitted.
Nothing new there.
However one option was to instead of drawing itself, send a downloadable
object: To this end, serverside, instead of sending an updated HTML
version of itself, it sends some headers, and some data as a file
download. And that is ALL it sends.
Now I would have thought that this would in some way cancel the existing
window with the form in it, but it seems that all the browsers I have
tested against take this response - a file rather than an HTML document,
being sent, as a directive to spawn a separate download dialogue box,
and eve the main screen unaltered.
This is in fact exactly what I wanted, and saves me the trouble of
working out how to split the session into two browser windows - getting
the main window back and having a download happen, but can I rely on this?
Is it guaranteed behaviour to some standard, or just 'the way
firefox/safari/IE7 work'?
Apologies for asking here, but I don't even now where to LOOK for the
answer.