W
Wizfrog
Hello...
I'm developping a client-side application with XML and Javascript.
The idea is that it could run off-line in a browser, using a
previously downloaded XML database, or could run of a server if it is
scaled to very many users... but for now, it is to be ran off-line
primarily.
I want to generate a MS Word document in XML (i can do that) from the
data in the XML DB, but mostly I want to be able to open the generated
document AS an MS Word document.
in this example:
http://www.codeproject.com/office/Wordyna.asp
the file is generated on the server, and the HTTP header is set so
that it opens as a Word file.
So, I need to open a new window and be able to set the http Header
Content-Type as "application/msword".
and maybe also "Content-Disposition" as attachement or something..
I just don't know how it is possible to open a new window with a
specific HTTP Header in Javascript. I know Javascrit cannot CHANGE the
http header of the page it's runnig from, but can it open a new window
with a given HTTP header?
I can open a new window and dump my XML there, but then what? If I use
a script to "save", I run into security issues, if I ask the user to
use "save as" in the browser, it won't save with .DOC extension, and
if I open Word with JScript, there are the security issues again.
Any suggestions welcome!
I'm developping a client-side application with XML and Javascript.
The idea is that it could run off-line in a browser, using a
previously downloaded XML database, or could run of a server if it is
scaled to very many users... but for now, it is to be ran off-line
primarily.
I want to generate a MS Word document in XML (i can do that) from the
data in the XML DB, but mostly I want to be able to open the generated
document AS an MS Word document.
in this example:
http://www.codeproject.com/office/Wordyna.asp
the file is generated on the server, and the HTTP header is set so
that it opens as a Word file.
So, I need to open a new window and be able to set the http Header
Content-Type as "application/msword".
and maybe also "Content-Disposition" as attachement or something..
I just don't know how it is possible to open a new window with a
specific HTTP Header in Javascript. I know Javascrit cannot CHANGE the
http header of the page it's runnig from, but can it open a new window
with a given HTTP header?
I can open a new window and dump my XML there, but then what? If I use
a script to "save", I run into security issues, if I ask the user to
use "save as" in the browser, it won't save with .DOC extension, and
if I open Word with JScript, there are the security issues again.
Any suggestions welcome!