How to avoid open/save dialog box while accessing a word documentfrom server

R

RAJ

hi to everybody,

i have define a link which say like below
<a href=/one/two/test.doc target="_blank">download document</a>

when i click "download document" link one dialog box appears asking
open/save/cancel


now i need to avoid that dialog box and need to download the document
directly.

can anybody help me please how to avoid that dialog box?
(it should only ask for place where i can store)


thanks and take care to all.
 
E

Erwin Moller

RAJ said:
hi to everybody,

i have define a link which say like below
<a href=/one/two/test.doc target="_blank">download document</a>

when i click "download document" link one dialog box appears asking
open/save/cancel


now i need to avoid that dialog box and need to download the document
directly.

can anybody help me please how to avoid that dialog box?
(it should only ask for place where i can store)


thanks and take care to all.

Hi,

You'll have to send the right headers too from the server.

From PHP for example:
header("Content-type: application/msword");
header("Content-Disposition: attachment; filename=worddoc.doc");

Maybe a few more headers are needed.
Try the above, and Google around.

Good luck.

Regards,
Erwin Moller
 
T

Thomas 'PointedEars' Lahn

RAJ said:
i have define a link which say like below
<a href=/one/two/test.doc target="_blank">download document</a>
http://validator.w3.org/

when i click "download document" link one dialog box appears asking
open/save/cancel

now i need to avoid that dialog box and need to download the document
directly.

Four get it. [psf 4.13]


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top