Open download file in new window.

Hi,
I m using oracle 11g and Apex4.0.2 version
Browser IE8.
I m downloading PDF file when a button is pressed.
The code will be
htp.init;
OWA_UTIL.MIME_HEADER(NVL(L_V_MIME,'application/octet'),FALSE);
owa_util.http_header_close;
WPG_DOCLOAD.DOWNLOAD_FILE(BLOB_content);
It works fine by opening the pdf file.
But I need the pdf file to be opened in new tab page or in new window.
Is it possible?

vk,
it seems your page process is not triggering or it was not working quite right in the first place.
It should be something lke this:
Name: DOWNLOAD_FILE
Type: PL/SQL anonymous block
Process Point: On Submit - After validations
When Button Pressed: DOWNLOAD
Source
/* if the BLOB content is stored in wwv_flow_files: */
DECLARE
  l_blob_content wwv_flow_files.blob_content%TYPE;
  l_mime_type    wwv_flow_files.mime_type%TYPE;
BEGIN
SELECT blob_content, mime_type
INTO  l_blob_content, l_mime_type
FROM  wwv_flow_files
WHERE  ... /* how you access your file */
htp.init;
OWA_UTIL.MIME_HEADER(NVL(l_mime_type,'application/octet'),FALSE);
owa_util.http_header_close;
WPG_DOCLOAD.DOWNLOAD_FILE(l_blob_content);
--apex_application.stop_apex_engine;  /* APEX 4.1 and above */
apex_application.g_unrecoverable_error:= true;  /*before APEX 4.1 */
END;Jens

Similar Messages

  • How to make fileDownloadActionListener to open pdf file in new window

    Hi all ,
    i used the component [ fileDownloadActionListener ] to make download pdf file ,
    my question is
    How make this components to download and open file in new window ?
    Jdeveloper version 11.1.2.3

    Here is a sample http://technology.amis.nl/2011/07/28/adf-11g-show-pdf-in-a-popup/
    or http://mahmoudoracle.blogspot.de/2012/06/genius-adf-buttons.html#.UZygjrVM_Lk
    in General you can use the technique described here http://tompeez.wordpress.com/2011/12/16/jdev11-1-2-1-0-handling-imagesfiles-in-adf-part-3/ and configure hte browser to püen the doenloaded file using the configured application (pdf reader in your case).
    Timo

  • Link to open pdf file in new window

    I want to create a link on a web page to open a pdf file in a
    new window. I used the "on click" "open brower window". Which does
    open the pdf file, but not in a new window. How do I open it in a
    new window?

    Your code is a mess:
    ** there is no apparent reason for the span:
    <td><span class="style1"
    onfocus="MM_openBrWindow('pdf/PR_launch.pdf','','')">Milford, OH
    So change that line to:
    <td>Milford, OH
    ** here you have two double quotes before This.
    <a title="”This" class="pdfFile"
    onclick="MM_openBrWindow('pdf/PR_Launch.pdf','','')"
    Change it to this, (with some other improvements):
    <a title="This" class="pdfFile"
    onclick="MM_openBrWindow(this.href,'','');return false"
    ** This is code salad:
    href="”PR_Launch.pdf”" link="" will="" open="" a=""
    .pdf=""
    file.”="">More (PR_Launch.pdf,
    230kb)</a></span></td>
    Change it to:
    href="pdf/PR_Launch.pdf">More (PR_Launch.pdf,
    230kb)</a></td>
    If you continue to have trouble, you might find my divaPOP
    Extension
    easier, and far more powerful. It automat6ically opens pdf
    files and
    links to all external files in a popup window without your
    needing to
    code each link:
    http://www.divahtml.com/products/divaPOP/open_popup_windows.php
    E. Michael Brandt
    www.divaHTML.com
    divaPOP : standards-compliant popup windows
    divaGPS : you-are-here menu highlighting
    divaFAQ : FAQ pages with pizazz
    www.valleywebdesigns.com/vwd_Vdw.asp
    JustSo PictureWindow
    JustSo PhotoAlbum, et alia

  • Open html file in new window it is opening in calling browser.

    Hi ,
    Am using adf 11.1.1.5 jdev.
    I have a pop in which pdf,html and rtf file extension are mentioned in drop down list . As i select htlm and fire command button .
    The generated html file is opening in the same browser which is replacing the calling page . I want to open in new window .
    thanks .

    Hi,
    iff you use ADF Faces, use a goLink with a target to _blank. If you don't use ADF Faces, provide more details to the question
    Frank

  • How to open PDF file in new window as default

    I have .pdf documents into which I have inserted links to other .pdf documents using pdfEdit995
    (I am a 77-year-old pensioner recording monumental inscriptions, not very computer literate and not able to afford expensive applications !) 
    The links in the temp.ps file (which pdf995 creates first) look like :-
    [ /Rect [85 225 107 228]
    /Border [ 0 0 0 ]
    /Action /Launch /File (.\\Another Folder\\TARGET FILE.PDF)
    /Subtype /Link
    /ANN pdfmark
    The links work fine, but open in the same window, which is annoying as it is then neccessry to re-open the original document, scroll down to the required page and find the next link.
    pdf995 support say that perhaps Adobe reader can be set to open in a new window, but I want this to be the default when I circulate my file to interested people, so would prefer to modify the links.
    Can anyone help with a smple solution ? (I also believe in Santa Claus !)
    System: Vista; Reader X 10.1.0

    I don't know if you can change this in the PS file, but if you had Acrobat you could embed the following code into your file, that will make sure the links open in a new window. However, you should be aware that this code will change the preferences at the application level, which some people might not appreciate.
    The code is:
    app.openInPlace = false;

  • Problem opening excel file in new window

    Hi,
    I have a JSF application that sends an Excel file back to the user.
    My backing bean has a method that uses POI to generate the excel file and then write it to the servlet response.
    This works fine if I call the method from a command button, but this displays the file in the current browser window, whereas I want to open the file in a new window.
    I added an onclick javascript call to a command button which does a window.open() to open a jsp in a new window. The jsp contains an empty view, as I'm using an on-load phase listener to make the call to my backing bean method which should send the excel file when the file opens.
    However, when the window opens, I get an IE error message saying 'Could not open xxx.faces', and then an excel error message saying 'Could not open xxx.xls. This may be because the file does not exist, or the file is already open etc etc'
    However, I found that if the popup window goes through a servlet (which just forwards to the jsp page) instead of going to the jsp directly, it works like a charm.
    Any ideas or suggestions on how to fix this would be very much appreciated. If I can't fix it I'll just stick with the servlet approach, although it just seems a bit messy.
    (I'm using IE6 SP2, tomcat 5.5 btw)
    Cheers,
    Stuart

    I'm doing a similar thing, but I use commandLink to lauch the window. CommandLink has the "target" attribute that I set to _blank.  As you would expect, that opens up the page in the new window.                                                                                                                                                                                                                                                                                                                                                                                                       

  • Please help to open PDF file in new window

    Hi!
    I have a My.pdf file, and file Other.pdf located in subfolder Myfolder.
    For example, my.pdf located on c:\Mydocs\My.pdf and Other.pdf located in c:\mydoc\Myfolder\Other.pdf
    I try make plugin that open Other.pdf in subfolder Myfolder, no matter in where My.pdf is located on computer.
    I found in SDK API, that I need create a new window for open pdf file, using WinAPI function - CreateWindow:
    HWND externHWnd = CreateWindow ("ExternalWindow", "PDFViewer",WS_OVERLAPPEDWINDOW,50, 50, 500, 500, 0, 0, gHINSTANCE, NULL);
    I copy example into Visual Studio, but in example there no gHINSTANCE is undeclared.
    or plese provide working code for my task
    Please help

    In which part of the SDK did you look.
    Do you really mean a plugin (control Acobat from inside - can only be written using C#)
    oder do you mean control/work with Acrobat from an external application (like vb,..) via activeX (=IAC).
    br, Reinhard

  • Safari 3.0.3 won't open PDF files in new window & won't download to desktop

    When I click on a PDF file at a website Safari opens a new browser window but the window is always blank. The PDF file never appears. When I try to download the file to the desktop (right click) it doesn't download. I've read everything about the PDF problem posted at any relevant forum here. I've tried the Quicktime MIME approach. Didn't work. I've disabled the "open PDF in browser" option in Adobe Reader. Didn't work. I've looked for the Adobe plug-in to relocate. Didn't work. I downloaded Adobe Reader 8. Didn't work. When I make Adobe the default rather than Preview, Safari still doesn't open the PDF files or download them. Is there anyone in the computing world who actually can fix this problem? And why hasn't this recurring problem that has affected so many others been escalated to Apple for resolution???!!!

    Installing the newest version of Adobe Reader and restarting Safari fixed this issue for me.

  • Not able to open excel file in new window any one plese help me as early

    Hi all,
    I have a imag tag in jsp on click on the image i am submitting the form
    1. i have used the below code
    HSSFWorkbook wb=viewHelper.getExcel();
    response.reset();
    ServletOutputStream outs = response.getOutputStream();
         response.setContentType("application/vnd.ms-excel");
         response.addHeader("Pragma", "No-cache");
         response.addHeader("Cache-control", "no-cache");
         response.addDateHeader("Expires",1 );
         wb.write(outs);
         outs.flush();
         outs.close();
         return;
    2. I got one dialog box to open ,save,cancel . if i try to open it is openeing in the same window i had made the request. i need it to ask for in which type of application to open. i.e, in excel , notepad,.....
    please mail me as soon as possible
    [email protected]

    I had a similar porblem....
    I got some help from...http://www.javaworld.com/javaworld/jw-10-2006/jw-1019-xmlexcel.html?page=1...
    This is my code in servlet...
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet spreadSheet = wb.createSheet("Users");
    spreadSheet.setColumnWidth((short) 0, (short) (256 * 25));
    spreadSheet.setColumnWidth((short) 1, (short) (256 * 25));
    // Creating Rows
    HSSFRow row = spreadSheet.createRow(0);
    HSSFCell cell = row.createCell((short) 1);
    cell.setCellValue("Year 2005");
    cell = row.createCell((short) 2);
    cell.setCellValue("Year 2004");
    HSSFRow row1 = spreadSheet.createRow(1);
    HSSFCellStyle cellStyle = wb.createCellStyle();
    cellStyle.setBorderRight(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderLeft(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);
    cell = row1.createCell((short) 0);
    cell.setCellValue("Revenue ($)");
    cell = row1.createCell((short) 1);
    cell.setCellValue("25656");
    cell = row1.createCell((short) 2);
    cell.setCellValue("15457");
    FileOutputStream output = new FileOutputStream(new File("/tmp/Users.xls"));
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "attachment;filename=Users.xls");
    ServletOutputStream out = response.getOutputStream();
    wb.write(output);
    output.flush();
    output.close();
    forward = null;
    In firefox i get the download dialog box but not able to open in from there,i need to save it and then open. In IE i dont get the dialog box instead the excell open inside the browser......Please help me to open a excel sheet onclick on a link "Export to excel" in jsp......
    Thanks in advance...

  • Open a generated pdf file in new window

    Dear all,
    I'm using JDev ADF 11.1.1.4.0
    I use the command button method to generate pdf file with JasperReports and I store it into the public folder /reports/test5.pdf. To open this file I can use goLink or goButton with target frame _blank, but how can I open this file automatically after generation?
    I was reading about fileDownloadActionListener, but it's not what I need, I just want to open the file in new window browser.
    Any help will be appreciated.
    Regards,
    Wojtek.

    try this
    HttpServletResponse response = (HttpServletResponse) FacesContext
                                      .getCurrentInstance().getExternalContext().getResponse();
                       ServletOutputStream servletOutputStream;
                       servletOutputStream = response.getOutputStream();
                       byte[] bytes = null;
                       JasperDesign jasperDesign;
                                try {
                                        jasperDesign = JRXmlLoader.load(ios);
                                        jasperReport = JasperCompileManager.compileReport(jasperDesign);                
                                        JRPdfExporter exporter = new JRPdfExporter();
                                        JasperPrint jasperPrint;
                                        jasperPrint =
                                                JasperFillManager.fillReport( jasperReport, parameters, connection );
                                    } catch (JRException e) {
                                            e.printStackTrace();
                                bytes =
                                JasperRunManager.runReportToPdf(jasperReport,parameters, connection);
                       response.addHeader("Content-disposition", 
                       "attachment;filename=sale.pdf"); 
                       response.setContentType("application/pdf");
                       response.setContentLength(bytes.length);
                       servletOutputStream.write(bytes, 0, bytes.length);
                       servletOutputStream.flush();
                       servletOutputStream.close();
                       context.responseComplete();
                            } catch (IOException e) {
                        e.printStackTrace();
                    } catch (JRException e) {
                         e.printStackTrace();
                    }

  • How do i open acsm file on my windows pc? i downloaded adobe digital edition, but it says error, check valuation?

    how do i open acsm file on my windows pc? i downloaded adobe digital edition, but it says error, check valuation?
    thanks in advance

    I'm wondering if that is similar to the issue I've encountered before, where the file association for acsm is not to ADE but a certificate file. If you could try right clicking on the acsm and 'open with' and search for ADE and make sure 'always open with this' is check marked, that may, I repeat may, help.
    If you've already done this, I don't know what to say, that's just what I've seen.

  • Firefox will not open tabs in a new window

    When I right click a tab, and select the option "Open in a new window", Firefox does not respond.
    I can add as many tabs as I like, but can not open them in a new window.
    I can also right click a link and open it in a new tab, but Firefox does not do anything when I try to open the link in a new window.
    I reinstalled Firefox on my computer, and also updated Java and it did not solve the problem.
    This started happening about a week ago for no apparent reason.

    First check to see if an add-on is causing this problem, for details on how to do that see the [[troubleshooting extensions and themes]] article.
    If that does not help, try creating a new profile. Firefox stores user data in the profile folder, creating a new profile will show if the problem is with the old profile. For how to do that see [http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows Creating a new Firefox profile on Windows]. If the new profile works, you can transfer select data such as bookmarks and passwords to the new profile. DO not copy the preferences file, and it is best to re-install add-ons. For details of how to do that see [http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox transferring data to a new profile].

  • Windows Explorer always opens folders in a new window

    Yes, yes, I've googled it already.  And bing-ed it just for fun too.
    This doesn't work:
    http://windowsxp.mvps.org/samewindow.htm
    Nor does this:
    http://blog.hansmelis.be/2009/05/17/windows-vista-explorer-opens-folders-in-a-new-window/
    Yes, yes, I've checked the Open in same folder option in folder options.
    I've used shellex to disable context menu items.
    I've rebooted a hundred times.
    This is rediculous.  Windows should only recognize ONE setting for this and that is the one in folder options.  Anything else that affects it is a BUG!
    I'm on build 7100 RC.
    And I'm quite frustrated with this.
    Please help!
    Jared

    <<...tried to import the key from that known-good windows installation ...... (but
    was 64bits)...>>
    importing x64 keys to an x86 installation may not work.  HKLM\WOW6432Node\Classes\Interface would have to be combined with (overwrite)
    the standard location and then that be copied/imported to the x86 install.  Even then, there might be some unanticipated problems. 
    It's good that you had a registry backup available in system restore.  Although I like the inherent security and reliability in the Vista/Win7 system restore implementations, one thing that I miss was being able to pluck only the registry files from
    a restore point; like I used to do with WinXP.
    <<...Yes, my case is precisely (Windows Explorer always opens folders in a new window) on
    Win7. ....>>
    Also, that is too general.  There is more nitty-gritty details that have to be verified, such as whether the issue is per-user,
    or whether the "Explore" option is in bold and works properly when manually selected.  In a lot of cases, that simply may not be in bold which means it's no longer the default action on double-click.  (requires different set of steps to resolve,
    focusing on another part of the registry)  But from what you've stated on JAVA update 20, there well could be some changes to the HKLM portion of that Interface key... don't know.  A before and after registry compare usually helps pin down the issue.
    EDIT 10y04m24d_130735:
     One other thing that occurs to me, is that the dreaded Yahoo toolbar often installs with Sun Microsystems's JAVA.  I've removed such toolbars on many browsers because they render IE8 unstable/unreliable with occasional to routine freezes/crashes.

  • Opening PDF Document in New Window

    Hi,
    I have requirement to open pdf document in new window. I'm using Travel Expense form. I'm using the FM PTRM_WEB_FORM_PDF_GET. When I give 'X' to i_display_form, it displays the pdf document in same session or window. But I would like to open the pdf file in new window.
    The FM gives me pdf data of type RAWSTRING. Is there any FM or class where I can pass this data and open it in New Window.
    Can anyone please suggest on this.
    Regards,
    JMB

    download it using  gui_download and use cl_gui_frontend_services=>execute to execute that pdf file

  • Today I think firefox automatically installed a new version and after that it said my adobe flash was old so I had to update that. Now I can't open links in a new window.

    Today I think firefox automatically installed a new version and after that it said my adobe flash was old so I had to update that. Now I can't open links in a new window.

    Firefox doesn't install new versions of plugins, but Flash may update itself automatically.<br />
    You are still one version behind on Flash, current is Flash 10.1 r85<br />
    If the Flash player didn't update properly then you need to download the full version and run the installer as Administrator (right-click: Run as ...)
    Flash Global Notifications Settings Panel:<br />
    *http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager05.html
    You are more versions behind on Java updates with having Java 6 U11, current is 6 U22.
    *Java Plug-in 1.6.0_11 for Netscape Navigator (DLL Helper)
    Update the [[Java]] plugin to the latest version.
    *http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)

Maybe you are looking for

  • Itunes 10.6 crashes Windows XP SP2

    I have tried uninstalling & reinstalling via instructions from this forum. It still crashes my entire system, requiring a restart. I have no plugins or security software installed. In desperation I installed Spotify. It plays my music fine, but in ge

  • FM for deleting customer contact detail

    Hi, is there any function module to delete the customer contact details. If so, please tell me . thanks chandra

  • What are the essential services that are required for ensuring server is healthy up ?

    Hi All, Please advise me What are the essential services that are required for ensuring server is healthy up ? Warm regards, jk1510

  • N97: Tasks not displayed

    I'm using a MfE account on my N97. When synchronizing all items are well received and send so to see. However the task items (which are indeed synchronized) cannot be not displayed in my calendar application.  Does anyone recognizes this problem and/

  • BT infinity FTTP

    I'm very anxious to get "BT infinity" in fact I check samknows.com at least once a week to see if my activation date has been moved closer, today I was very happy to see its being moved from the 01.06/12 to 01/03/12. I've also checked online and down