Download a file without opening new window

Hi everybody,
I need to save a file to local PC into a certain predefined file in such a way that user does not get any pop-ups or new windows - i.e. 'in background'.
I have tried 'FileDownload' - this get file content displayed in new window and if saved is to be allowed - a save pop-up is displayed.
If I try attach_file_to_response of cl_wd_runtime_services - it also gives a pop-up.
Does anybody know a way to download a file to local PC in such a way that the content of the file is not displayed in the new pop-up window and save dialog does not appear?
Thank you for your help.
Helen

Hi Olena,
You will not be able to download a file in the background due to the browser security defaults. All browsers always prompt the users to accept files otherwise viruses and trojans would be able to be installed on your pc without you accepting them.
I know it is possible to write via SAPGui without a prompt but not from a browser.
Sorry.
Richard
PS Dont forget the points!

Similar Messages

  • Submitting variables to an ASPX file WITHOUT opening new window

    Hello,
    I'm trying to submit some variables from my flash to an aspx page on a different domain which will handle them and put them in a database.  I've tried a number of options, but the only ones that have worked also result in a new window/tab being opened, and I am trying to avoid this. 
    For example, I tried a loadVars with the sendAndLoad() function, but it did not work because the "load" portion requires the aspx page to be on the same domain as the swf- which it is not.
    the send() function does not work either, because it requires you to specify a target (_self, _blank, etc) and that causes a new tab to open, or a redirection on the current page- both unacceptable, as I am trying not to interupt the user's experience on the page the swf is featured on.  send() does succeed in submitting the variables, at least, but as I said, it opens a new tab/redirects current tab.
    One solution is to enable outside domains access on the server-side, but this is not ideal.  I'm hoping for a flash solution.  Any thoughts?
    here's the code:
    var dataLoader = new LoadVars();
    var junkLV:LoadVars = new LoadVars();
    junkLV.onLoad = function(success:Boolean) {
        if (success) {
            trace("We are in business.");
            greenLight_mc._alpha = 100;
        else {
            trace("FAIL");
            redLight_mc._alpha = 100;
    dataLoader.firstname = firstName;
    dataLoader.lastname = lastName;
    dataLoader.email = emailAddress;
    dataLoader.dest = destination;
    dataLoader.sendAndLoad("url.aspx", junkLV, "POST");

    Oh I'm sorry now I understand why you were asking.  the "url.aspx" is not the actual URL.  It will be a full url in the form http://www.domain/directory/file.aspx, which will indeed be on another domain.
    Sorry for the confusion. 

  • Display Archived Document in Abap Webdynpro without opening new window.

    I would like to create a wd4a application that receives the parameters of Archive ID and Doc ID and displays the archived document.  The document is stored as a pdf on SAP's content server.  Currently the webdynpro will open a separte blank Window.  I have not defined any view elements to the embedded view because I do know which view element I should to display the archived documente.  I have a url to the document and it will get displayed by creating an new window by executing  the code below to launch the file in a separate window.   The Adobe Viewer creates a new window to view the document.  Does  anyone know what view Uielement I should use to view the document in the main window and main view?
    Thank you
    Tom
    data ld_url type dms_url.
    data ls_message type bapiret2.
      call function 'SCMS_AO_URL_READ'
        exporting
          MANDT               = SY-MANDT
          arc_id              = id_archive_id
          doc_id              = id_arc_doc_id
          COMP_ID             =
          DOCUMENT_TYPE       = ' '
          PDF_MODE            = 'A'
          HTTP_URL_ONLY       = ' '
          DP_URL_ONLY         = ' '
           loc_info            = 'F'
          LIFETIME            = 'T'
          NO_CACHE            = ' '
       importing
         url                 = ld_url
       exceptions
           error               = 1
           others              = 2
    assert sy-subrc = 0.
    added by YINS Mar.05 2007
      if sy-subrc <> 0.
        ls_message-type = 'E'.
        ls_message-id = sy-msgid.
        ls_message-number = sy-msgno.
        ls_message-message_v1 = sy-msgv1.
        ls_message-message_v2 = sy-msgv2.
        ls_message-message_v3 = sy-msgv3.
        ls_message-message_v4 = sy-msgv4.
        append ls_message to wd_this->mt_messages.
       wd_this->flush_messages( ).
        return.
      endif.
      data:
        lr_api_comp_controller  type ref to if_wd_component,
        lr_window_manager       type ref to if_wd_window_manager,
        lr_window               type ref to if_wd_window,
        ld_url_str              type string.
      lr_api_comp_controller = wd_this->wd_get_api( ).
      lr_window_manager = lr_api_comp_controller->get_window_manager( ).
      ld_url_str = ld_url.
      lr_window = lr_window_manager->create_external_window(
          url   = ld_url_str
      lr_window->open( ).

    I found a solution after much troubleshooting including uninstalling/reinstalling Office 2010 which didn't solve the issue. 
    Here it is:
    When Outlook or some other Office program is minimized in the taskbar and won't open, right click the taskbar to bring up task manager. 
    Right click the program in the task manager list that is giving trouble and click Maximize.  You should now see a full screen.
    This worked for me and solved the "open and stays minimized" delima.  Hope this helps you too.  Cheers :)
    Thanks a bunch this saved me a potential headache!

  • How do I reenable Firefox 11 to download pdf files without opening them? Thank you!

    First, I'd just get a blank screen. Then I learned to change 'get info.' window to open Firefox in 32-bit mode. Now, pdfs easily open, but I don't how to just download them (for later viewing) without opening them.

    On Mac, use: Firefox > Preferences > Applications<br />
    You can set the action to "Always Ask"
    *http://kb.mozillazine.org/File_types_and_download_actions

  • HTTP form post from Web Dynpro Java Application without opening new window

    Hi Experts,
    We are trying to submit form data to an external URL from Web Dynpro Java application. We are achieving this with the following piece of code.
      try
       strPrintContent="<html>"+
         "<head>"+
         "<script type=\"text/javascript\">"+   
         "function myfunc () "+
         "{"+
         "var frm = document.getElementById(\"paymentForm\");"+
         "frm.submit();"+
         "}"+
         "</script>"+
         "</head>"+
         "<body onLoad=myfunc()>"+
         "<form id=paymentForm  method=post action=\""+merchantURLPart+"\">"+
         "<INPUT type=hidden name=username value="+userName+">"+
         "<INPUT type=hidden name=pass value="+passWord+">"+
         "<INPUT type=hidden name=senderid value="+senderID+">"+    
         "<INPUT type=hidden name=dest_mobileno value="+mobile+">"+
         "<INPUT type=hidden name=message value='"+msg+"'>"+
         "<INPUT type=hidden name=response value="+response+">"+
         "</form>"+
         "</body>"+
         "</html>";    
      IWDWebResource webResource = WDWebResource.getWebResource(strPrintContent.getBytes(),WDWebResourceType.HTML);
      IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(webResource.getAbsoluteURL(),"WBSEDCL");
      window.show();
      catch(Exception e)
      wdComponentAPI.getMessageManager().reportException("Error : "+e.toString(),false);
    But it opens another window. We dont need that. We have to stay on the same window.  Please suggest what can be done.

    Hi,
    You can create a HTML file with the request post parameters and the external URL something like this:
    public java.lang.String GetRedirecturl( )
    // External URL
    String html = "<html><head></head><body onload=\"load()\"> " +
    "<form id=\"form1\" action=\"https://www.abc.com/xyz.jsp\" method=\"POST\">" +
    // Post Parameters
    "<INPUT TYPE=\"HIDDEN\" NAME=\"Param1\"VALUE=\""+Param1Value+"\">"+
    "<input name=\"sap-wd-resumeurl\" type=\"hidden\"/>" +
    "</form> " +
    "" +
    "<script>" +
    "function load(){" +
    "var loc = window.location.search.substring(1);" +
    "var queryString = loc.split(\"sap-wd-resumeurl=\");" +
    "if(queryString.length > 0)" +
    "{" +
    "var resumeURL = queryString[1].split(\"&\");" +
    "if(resumeURL.length >= 0)" +
    "{" +
    " document.forms['form1'].elements['sap-wd-resumeurl'].value= unescape(resumeURL[0])" +
    "}" +
    "}" +
    "document.getElementById('form1').submit();" +
    "}" +
    "</script>" +
    "</body> </html>";
    String redirectUrl = "";
    byte[] byteArrayHtmlData = null;
    try {
      byteArrayHtmlData = html.getBytes("UTF-8");
    } catch (UnsupportedEncodingException e) {
      wdComponentAPI.getMessageManager().reportException("Internal error occurred. Please try after some time",true);
    IWDResource htmlResource = WDResourceFactory.createCachedResource(new ByteArrayInputStream(byteArrayHtmlData), "Redirect.html", WDWebResourceType.HTML, true);
    redirectUrl = htmlResource.getUrl(WDFileDownloadBehaviour.AUTO.ordinal());
    return redirectUrl;
    Hope this will be helpful.
    Regards,
    Anurag

  • Safari always opens new windows/tabs

    Every time I click on a link Safari opens a new window or tab instead of just going to that link in the window that I am in. So when I close Safari I have multiple pages/tabs open.  It used to just go from page to page without opening new windows or tabs. What setting needs to be changed to get back to the single window?

    I figure out what the problem is. I set the Google search to open link in new window, and then it can be opened in tab with one tap. Thanks for help!

  • Every each click on mp3, audio, video, photo open new window...

    hi
    i have problem with my KDE, when i open some folder with for example music... i have 100 track, and click on any one, KDE open window of player, good... but when i click on other file, KDE open NEW window of player, don't use currently open window but open new, same problem i have with video and photo files, and this not confortable to use because all the time i have to close first existing window of player before click on other file... maybe someone know how i can fix this problem ??
    thx

    its not work, same problem, dosent meter about player... in GNOME its fine, but only in KDE the problem existing.

  • Open file in a new window thru custom global link

    Hi All,
    I have created a custom global link. I want to open a PDF file (present at OA_HTML) from that link.
    So, I created a function for that link having below properties:
    Web HTML : file_name.pdf
    Type: SSWA plsql function that opens a new window (Kiosk Mode)
    File is opening successfully but in the same window. I want to open that file in a new window.
    Please suggest some solution for this.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    I have created a blank page and write logic to download file in that.
    Later, on click on global link, navigated the same to that blank page. So, open save dialog is coming on click of custom global link.
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Kate always open files in a new window after kde upgrade

    kate always open files in a new window, instead of the existing window as a new document after kde upgrade to 3.5. someone else have the same experience and have a solution for that ?
    cheers,
    notz

    The problem is solved!
    Apparently the Content Disposition: Attachment in the BLOB Download Format Mask does the trick.
    For some reason I have to logout and login again in the application to see the change.
    I tried changing the Content Disposition to Inline and then back to Attachment, and the file keeps opening in the same window unless I start a new session.
    Is there any explanation why it is working that way?
    Thanks!
    Erick

  • How can I put OSX 10.7 on a new Macbook Air. Maverick no longer allows "open file in a new window" and I really miss it. At the Apple Store they told me it can't be added to the new OSX 10.10 so I  want to change the OSX on the new Macbook Air and it

    I have been using a 2012 Mac pro to do HD video editing. I bought a new portable Macbook Air only to find that Maverick no longer has "open files in a new window" which I use all the time in the very large folders of video clips and royalty-free music. I asked at the Apple Store how I could get this back on the Macbook Air and they said it couldn't be done so I thought I would re-format the HD and install 10.7 on it and was notified by the Macbook Air I can't put 10.7 on that computer. Apple use to give this as an option but now they have gone more to the attitude of "Do it our way or go to ****!" In anger I went out and bought a Dell Laptop and Pinnacle Studio 17 which I have been learning to use. I have been an Apple/Mac user since 1979 and would still rather do my video editing on a Mac. Is there any way that I can force the Macbook Air to let me load in OSX 10.7 where there is still the option to  "open files in a new window" or is there a way to add this to Maverick? The experts at the Madison, WI Couldn't give me any help on this.

    Choose Preferences from the Finder menu, click on the General tab, and uncheck the box to open folders in a new tab.
    (117195)

  • Just downloaded Firefox 6.0 and have restarted 4 plus times, but it continues to hang while launching. I cannot open new windows, change any settings, or do anything but Force Quit. I'm on Mac OSX 10.5.8. How do I get past this hang?

    Just downloaded Firefox 6.0 and have restarted 4 plus times, but it continues to hang while launching. I cannot open new windows, change any settings, or do anything but Force Quit. I'm on Mac OSX 10.5.8. How do I get past this hang?

    Long story short: Simply get CC for teams. At 500 bucks a year it's a steal and those 5 licenses in the base package (or was it 10 even?) cover all your computers, at least the 3 ones you mentioned. For system requirements refer to the individual product pages.
    Mylenium

  • Open file in a new window

    Hi All,
    I am adding a file item to a folder in a content area. The folder is published as a portlet on a page. Now when the user clicks on the file item, I want the file to open in a new window. I know its possible to do it when you add an URL item where there is a option where you can select the item to open in a new window. But in case of a file item, I did not find any way for openiging it in a new window. I would like to know how to open the file in a new window and if there is a workaround for the same.
    I am using portal version 30.6.6.5.
    Thanks
    null

    Here's a solution for Portal 3.0.8 or later that allows you to open a file in a new browser window. It requires that you create a custom item type, and use a procedure to display a link to the file.
    1. Create the following procedure. You can create it in any schema, but the schema has to have select privilege on the view 'WWSBR_ALL_ITEMS' in the portal schema. In this example, the portal schema is PORTAL30. If you're running version 3.0.8, you'll also need to apply the patch to bug 1724250.
    Create or Replace PROCEDURE OPEN_FILE (p_itemid IN NUMBER) as
    fileURL varchar2(1024);
    baseURL varchar2(256) := '/pls/portal30/docs/';
    begin
    select baseURL &#0124; &#0124; filename into fileURL
    from portal30.wwsbr_all_items
    where id = p_ItemId;
    htp.p ('Open File');
    EXCEPTION
    when NO_DATA_FOUND then
    htp.p('Document not found or access denied');
    when others then
    htp.p(sqlerrm);
    end;
    The procedure generates a link to the item filename with a target of "_blank", which opens the file in a new browser window. Replace the baseURL attribute value with the correct Database Access Descriptor (DAD) and Document Access Path ("/docs") for your site.
    2. Grant execute on the procedure to the portal public schema. The name of this schema is <portal schema>PUBLIC. So if your portal schema is PORTAL30, grant execute on the procedure to PORTAL30PUBLIC.
    3. Create a custom item type, using the base item type of "File". I recommend that you create the type in the Shared Objects content area, so it can be used in other content areas (from the Navigator, go to the Content Areas tab, select Contents for Shared Objects, Custom Types, and Item Types - Create). Edit the new type and go to the Procedures tab.
    4. In the Procedure Call Properties, enter:
    [list]
    [*]Type: PL/SQL
    [*]Procedure Call: <your procedure schema>.OPEN_FILE
    [*]Link Text: Open File (it doesn't matter what you put here - it only displays if "Display Procedure Results With Item" is unchecked.)
    [*]Check "Display Procedure Results With Item"
    [list]
    5. Under "Pass Attributes as Parameters", enter:
    [list]
    [*]Attribute: Item Id
    [*]Pass As: p_itemid
    [list]
    (Notice how you can pass most of an item's attributes to a procedure. You can take advantage of this feature to write procedures that give you precise control over the rendering of your items).
    6. In the properties for the content areas in which the new type is to be used, go to the Items tab. Specify that you want the new type to be visible. You may want to hide the base File item type, so users won't be confused by two different item types for files.
    7. Edit the folder style for the content area. Go to Folder Layout. Edit the region properties for each region in which you will be using the new item type. For each region, replace "Display Name or Image" with "Display Name". "Display Name or Image" will render the Display Name as a link to your file that opens the file in the same browser window. "Display Name" simply renders the display name as text, with no link.
    8. Now you can create items of the new item type. Each item's Display Name will appear next to a link that says "Open File". Clicking the link will cause the file to open in a new browser window.
    Hope you find this useful.
    Regards,
    Jerry

  • How to open WMV files in a new window

    I would like to open and play Windows Media Player files in a
    new window that is sized to the player window - not a full new
    page. I cannot seem to find an exension that would handle this.
    Anyone have a place I can look?

    Yes, and if you multiple windows to open, you can save time
    and effort
    with my divaPOPgold:
    http://divahtml.com/products/divaPOPgold/open_popup_windows.php
    E. Michael Brandt
    www.divahtml.com
    www.divahtml.com/products/scripts_dreamweaver_extensions.php
    Standards-compliant scripts and Dreamweaver Extensions
    www.valleywebdesigns.com/vwd_Vdw.asp
    JustSo PictureWindow
    JustSo PhotoAlbum, et alia

  • Hyperlink to open a file in a new window

    I have been trying to format the hyperlink to a file so it opens on a new window. iWeb allows us to check the box 'open in new window' only for links to external pages; when we insert a link to a file, I realize the app uploads the file to the website, but I could not find a way to have it open in a new window. Is there a way we can get to and format the hyperlink reference?

    1. Create the link that connects to the file (pdf or whatever) on a separate page of your site on iWeb.
    2. Publish your site, then go on the internet to the page that has this link. Keep this page open on your Safari or some web browser you use.
    3. Go back to your iWeb and create another link on a different page (home page, for example) of your site, and connect this link to the URL of the open page in step 2 with "Link to: An External Page" option. Click to choose "Open link in new window" on the Inspector panel. Name this link that has something to do with the file of interest in step 1.
    4. On your iWeb, go the page created in step 1 and make sure "include page in navigation menu" is not selected or checked in the Inspector panel so that web visitor will not get to this page directly.
    5. Publish your site. Now go to your site on the web to the page in step 3. Click on the link and it will open a new page with the link that has the file attached. Visitor can now open the file in that new window.
    • It seems complicated, but you'll get it.
    • You may need to refresh the pages on Safari to make it work if you have left Safari on throughout your work.
    • For this method, you have to dedicate a page to carry the link that connects to the file.
    Example: I create a page that has list of links to the files for viewing. These files are weekly reports. Each file is named by its date such "March 4, 2011" "March 11, 2011" etc.. This page will be hidden from visitors at first when they visit my site. Then I create on my home page a link called "Weekly Reports" that open to "External Page" via the option I have in Inspector. Even though it says "External Page" I use the URL of the hidden page containing all the actual files. On this "hidden" page, I also has a link called "Weekly Report" but this link is connected directly to this page. I do this only because I want the "hidden" page to look like my home page in terms of displayed links.

  • Opening new window on button click from pdf without loosing session

    Hi,
    In my Java web applicaion on click of a link, we are opening a new window in which we are displaying a pdf. There are 5 buttons on this pdf.
    On clicking of this button again we are opening a application link in new window. But in this window we are not gettting our session, which is there in first two window.
    For opening new window from pdf button click we are using
    var dynamicUrl3 = myappurl;
    app.launchURL(dynamicUrl, true); 
    How can i open new window with the same sesion from the pdf button.
    Please help for the same.
    Thanks,
    Abhijit Mohite.

    Yes, with target="_blank" in a link or a form.Thanks for ur valuable suggestion. I changed the button to link.
    Its working fine now without JavaScript.
    Now i got another requirement. When user select some items and press a button in the new popup window, the window must close on button click and the parent window must refresh. This must also be done without using JavaScript.
    Is this possible? Please give me an idea to do this.
    Thanks.

Maybe you are looking for