Skip to Content

Document Download: IE Prompts with Two Open or Save Dialog Boxes


I do download Documents (e.g. Excel) and want to provide the user always the option of opening in the related application or saving it.

I use content-disposition (attachment, not inline)

as http header field.

When opening (not saving) the Internet Explorer always prompts twice with the "save or open" dialog box.

Any idea?


l_value = l_s_skwf_cpprp-mimetype.


name = 'Content-Type' value = l_value ).


name = 'cache-control' value = 'max-age=0' ).


name = 'Expires' ).

runtime->server->response->delete_header_field( name = 'Pragma' ).

concatenate 'attachment; filename=' l_docline-filename into l_value.

runtime->server->response->set_header_field( name = 'content-disposition' value = l_value ).


data = file_content

length = l_file_length ).

navigation->response_complete( ).

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Apr 28, 2004 at 11:32 AM

    If You uncheck the checkbox "Always ask before opening this type of file" on the second dialog box, this will no more be asked for this file type.

    The result can also be seen in the Windows Explorer

    -> Menu "Folder Options"

    -> "File Types"

    -> "Advanced"

    -> "Confirm open after download"

    The checkbox will no more be checked for the file type.

    It was just on my PC, that I was asked again and again although I uncheck the checkbox "Always ask before opening this type of file"...

    I recommend on this the MS Knowledge Base articles




    In the code below the parameter "length" in the method "set_data" should not be set.

    Good luck,

    Christian Niemann

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.