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 | | 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

Similar Messages

  • 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)

  • Simply put, I do not like like the new color coding "dots" and I do not like having to press the Command key before double clicking to open files in a new window. How hard would have been to include the old version of these two features?

    Simply put, I do not like like the new color coding "dots" and I do not like having to press the Command key before double clicking to open files in a new window. How hard would have been to include the old version of these two features?

    Apple - Mac OS X - Feedback

  • 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

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Open PDF's in new window in document library when using "Find a file" search

    I need to be able to open PDF's in a new window from a document library when using the "Find a file" search built into the document library "All documents" view. I currently have the following javascript on the page:
    _spBodyOnLoadFunctionNames.push("setTargetBlank()");
    function setTargetBlank()
    { $("a[href$='.pdf']").removeAttr('onclick').attr("target", "_blank");
    This works great when going to the document library and navigating through the folders then clicking on a link.
    The problem is when someone goes to the document library then uses the "Find a file" search and then they click on a link. The "Find a file" search does not do a postback (reload) of the page, therefore my javascript to find the PDF links
    and make them open in a new window does not run for the links on the page.
    I have read the following article but this does not seem to offer a solution that will work in this situation for SharePoint 2013 (Office 365): http://social.technet.microsoft.com/Forums/sharepoint/en-US/7ad3224c-3165-47ae-95bc-4f3928e2f9a8/opening-document-library-pdf-in-a-new-window-sharepoint-2013?forum=sharepointgeneral
    I suppose the idea solution would be to somehow tap into the event that is fired when using "Find a file" search to run my javascript and update the links for the search results.
    Can anyone offer any solutions to this issue?

    Hi,
    According to your description, my understanding is that you want to open PDF files in a new window from a document library when using the "Find a file" search.
    As you said, the "Find a file" search does not do a postback (reload) of the page, therefore JavaScript to find the PDF links and make them open in a new window does not run for the links on the page.
    I recommend to use JS link to achieve the goal. Create a JavaScript override file and upload the JavaScript file to the Master Page Gallery, and then set the JS Link property of the document library web part to point to the JavaScript file.
    Here are some links about the JS link in SharePoint 2013 for you to take a look:
    http://www.idubbs.com/blog/2012/js-link-for-sharepoint-2013-web-partsa-quick-functional-primer/
    http://www.learningsharepoint.com/2013/04/13/sharepoint-2013-js-link-tutorial/
    http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013
    Thanks,
    Victoria
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Victoria Xia
    TechNet Community Support

  • 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.

  • Open a pdf file in a new window

    How do you have a pdf file open up in a new window in
    DW8?

    If you are coding a page with a HTML Transitional doctype,
    you can link to
    the PDF file, and assign a target="_blank" option to the
    link. If you are
    coding a page with an XHTML doctype, then you would need to
    do this
    differently if you want the page to validate.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "omealh" <[email protected]> wrote in
    message
    news:giocbd$rm6$[email protected]..
    > How do you have a pdf file open up in a new window in
    DW8?

  • Open quicktime link in new window

    iweb has been incredibly easy to figure out for me so far, except this: i can't get it to open my links to quicktime files in a new window. (would also like the new window to match the size of the player, not open a full size window.) i dont happen to be using a .mac account.
    tried just about everything i can find on the web but no luck...
    im doing a film site, have put up still images on page, want to click on them and have a small window pop up containing the quicktime file, leaving the rest of the page available behind it. i have the quicktime files all ready, but no idea what next...
    barely know a thing about html btw, which is why ive enjoyed iweb so far. is this possible? thanks for any info...

    Use some javascript code to open your QuickTime files in a new browser window.
    iWeb 2 allows "snippets" of code (copy/paste simple) or you can "hand edit" the published html file for your page to add them. Learning the basics of html will make this easier.
    One of my very old pages as an example:
    http://homepage.mac.com/kkirkster/bushbashquiz/index.html
    A "quiz" I borrowed from a CNN page. Hand editing allowed me to change the questions and add my own answers.
    Below the quiz are some "pop-up" windows (all done with javascript) that have some video examples in QuickTime formats. The "Flash" versions no longer display properly in QuickTime 7.4 so do not click on them.
    Reading the page source code will show you how it was done. Learning more about html page coding will explain what you're reading.
    It's as easy or as hard as you try to make it.

  • 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].

  • How do I link a reference point in one PDF to a specific page in a different PDF? I want it to open link in a new window AT the specific page.

    I have a paper with multiple reference points that I need to link to 3 other pdfs. Each time I create a link in the master PDF, I need to open a file in a new window and point to a specific page in the other pdf. I cannot get it to work.

    Hmmmm, just tried that and used the magnify glass to capture the specific page in the second pdf, but when I tried the link, it doesn't open a new window, it sits within the original pdf and I can't go back to the page I need to. What am I missing/
    [email signature removed]

  • 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

  • Open sheet in a new window

    Does anyone know how to open a sheet (in the same file) in a new window?
    I'd like to see these at the same time. It's also really annoying that each sheet scrolls to the top when de-selected, so that when I go back I hva to scroll down to the point where I was working. Seeing them both at the same time would be helpful.

    There is no open a sheet in a new window feature in Numbers.  The best solution is to make a summary sheet the refers to the items in the other sheets you want to see at the smae time.  This is difference than you are used to thinking about things.

Maybe you are looking for