Display documents of various type in new window.

I'm working on an application that needs to upload files from the client to the server and then allow the user to view those files in a separate browser window.
I have the file upload part working, but I don't know how to select the file from the server and have it displayed in a separate window.
Also, the files can be of different types image, plain text, PDF, Excel, or Word Document.
I suspect that some of these can just be displayed in a browser window, but not sure about a couple of them.
Could anyone point me to an example that will help me do this?

We can settle it at dinner the next time you're in town...
I actually prefer to tweak the Menu.jsp file myself (backing it up first) towards the end of line 332, just before the img tag for the Images/blank.gif reference.
<% if (SystemPermissionManager.hasPermission(Permissions.TEMPLATE_EDITOR, user)) {%><a class="small" href="Admin/TemplateEditor.jsp" target="_blank">TE</a><%} %>
Then you can have it do whatever you want...and I prefer the old-school Template Editor that didn't split it into Query and Display nonesense.
Regards,
Jeremy

Similar Messages

  • Opening Document Library PDF in a New Window (Sharepoint 2013)

    Hello,
    I have numerous PDF's in a document library. When the PDF opens in the browser, the PDF's contain links to various other sites; however, when the user clicks the link on the PDF from the document library, the link opens in the same window as the PDF. I would
    like the link to open the PDF in a new browser window.
    I have searched Google but cannot find anything for SharePoint 2013. We are hosting our SharePoint on the Office 365 package.  I found one solution that is repeated on many forums, but I do not see the "Convert to XSLT data view" anywhere
    in SharePoint designer 2013. The solution states:
    "Edit the document library in SharePoint Designer.
    1. Open the site in SharePoint Designer and then open the document library allitems.aspx.
    2. Right-click the document library web part and select “Convert to XSLT data view”.
    3. Locate the name column, you will see this tag “<A onfocus="OnLink(this)" HREF="{@FileRef}"….. ”, add “target=”_blank”” in tag.
    4. After this, the documents will be opened in a new window."
    I do  see my allitems.aspx and can open that with a text editor. The contents of that file are:
    <%@ Page language="C#" MasterPageFile="~masterurl/default.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=16.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <%@ Register Tagprefix="ApplicationPages" Namespace="Microsoft.SharePoint.ApplicationPages.WebControls" Assembly="Microsoft.SharePoint, Version=16.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    <asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server"><SharePoint:ListProperty Property="TitleOrFolder" runat="server"/> - <SharePoint:ListProperty Property="CurrentViewTitle" runat="server"/></asp:Content>
    <asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
    <SharePoint:RssLink runat="server" />
    </asp:content>
    <asp:Content ContentPlaceHolderId="PlaceHolderPageImage" runat="server"><SharePoint:ViewIcon Width="145" Height="54" runat="server" /></asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderLeftActions" runat="server">
    <SharePoint:RecentChangesMenu runat="server" id="RecentChanges"/>
    <SharePoint:ModifySettingsLink runat="server" />
    </asp:Content>
    <asp:Content ContentPlaceHolderId ="PlaceHolderBodyLeftBorder" runat="server">
    <div height="100%" class="ms-pagemargin"><img src="/_layouts/15/images/blank.gif?rev=32" width='6' height='1' alt="" data-accessibility-nocheck="true"/></div>
    </asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
    <WebPartPages:WebPartZone runat="server" FrameType="None" ID="Main" Title="loc:Main" />
    </asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderPageDescription" runat="server">
    <SharePoint:ListProperty CssClass="ms-listdescription" Property="Description" runat="server"/>
    </asp:Content>
    <asp:Content ContentPlaceHolderId="PlaceHolderCalendarNavigator" runat="server">
    <SharePoint:SPCalendarNavigator id="CalendarNavigatorId" runat="server"/>
    <ApplicationPages:CalendarAggregationPanel id="AggregationPanel" runat="server"/>
    </asp:Content>

    did you try this one?
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/71b24f4b-570a-48fa-9ec3-91073eafaebd/open-pdfs-in-new-window?forum=sharepointadminprevious
    or trying to use the content editor web part...
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/9db08c4a-b53c-419a-84f8-001c194d1311/how-to-open-sharepoint-document-library-pdf-file-in-new-window?forum=sharepointadminlegacy
    try this solution...check the column which having the clickable link.
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/99e9559a-da76-4722-982c-882b3e4181c7/hyperlink-column-type-open-in-new-window
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • Displaying Search iview results in a new window

    Hi,
    I am using a basicsearch iview to search a folder. Now, when I do a search I want the results to open in a new window. I was going over some questions in the SDN Forum and for the option "Launch in New Window", I did select Display in Seperate Window. Still, the results are not showing up in a new window. Is there anything else which needs to be done? I did create the component and options set. Does the Layout Set for Search Results play any role here? I am not very familiar with it and hence I have not done any configurations for it. Can anyone please point me in the right direction? Thanks for your valuable time and effort.
    Sincerely,
    Sri

    Hi Sri,
    The content in our implementation (project) is not transported yet, so I don't know if any problems will arise. But I just found a document which descripes a transport procedure. You can find on the SDN KM&C homepage or via this link: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/6.0/best practice for transporting sap netweaver portal content.pdf
    Hope it helps solving your problems.
    Best regards,
    Eric

  • Flex Bug - Cannot display full screen video in a new window

    My top level application consists of a login screen. When the user logs in successfully, the main application is closed using "this.close()" and a new Window() is opened. Inside the new window I've added the VideoPlayer component and specified a source.
    When I run the application, everything worked as expected. However as soon as I click the full screen option on the VideoPlayer, Flex says:
    Error: Error #3200: Cannot perform operation on closed window.
        at flash.display::Stage/desktop_set_displayState()
        at flash.display::Stage/set displayState()
        at spark.components::VideoPlayer/fullScreenButton_clickHandler()[E:\dev\4.x\frameworks\projects\spark\src\spark\components\VideoPlayer.as:2233]
    Inside the VideoPlayer.as file I've found what I think is the problem:
    2204: // add as a popup
    2205: PopUpManager.addPopUp(this, FlexGlobals.topLevelApplication as DisplayObject);
    I commented out line 2205 and added a new line:
    PopUpManager.addPopUp(this, parentApplication as DisplayObject);
    However I get the same error and it still says the problem is at line 2233 as well, even though line 2233 now reads (due to the additional line I added above):
    // TODO (rfrishbe): Should we make this FULL_SCREEN_INTERACTIVE if in AIR?
    I cleaned my project via the Project menu but I still get the same error message. Any idea how I can resolve this problem?

    Doesn't anyone know?

  • Safari has recently been displaying adverts everytime i open a new window

    Everytime i open a new window in Safari ads are popping up and new windows open automatically. How do i remove this. This those not happen when i use a different browser.

    There is no need to download anything to solve this problem. You may have installed a variant of the "VSearch" ad-injection malware.
    Triple-click the line below on this page to select it, then copy the text to the Clipboard by pressing the key combination  command-C:
    /Library/LaunchDaemons
    In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    A folder named "LaunchDaemons" may open. Look inside it for a file with a name of the form
              com.something.daemon.plist
    Here something is a variable word, which can be different in each case. It could be "cloud," "dot," "highway," "submarine," "trusteddownloads," or pretty much anything else.
    There may also be a file named
               com.something.helper.plist
    in the same folder.
    Leave the LaunchDaemons folder open, and open the following folder in the same way:
    /Library/LaunchAgents
    In this folder, there may be a file named
              com.something.agent.plist
    where the word something is exactly the same as before.
    If you feel confident that you've identified these three files, back up all data, then drag the three files you found to the Trash. You may be prompted for your administrator login password. Close the windows and restart the computer.
    Don't delete the "LaunchAgents" or "LaunchDaemons" folder or anything else inside either one.
    The malware is now permanently inactivated, as long as you never reinstall it. You can stop here if you like, or you can remove two remaining components for the sake of completeness.
    Open this folder:
    /Library/Application Support
    If it has a subfolder named just
               something
    (where something is the same word as before), drag that subfolder to the Trash and close the window.
    Don't delete the "Application Support" folder or anything else inside it.
    Finally, in this folder:
    /System/Library/Frameworks
    there may an item named exactly
                v.framework
    It's actually another folder, though it has a different icon. Drag it to the Trash and close the window.
    Don't delete the "Frameworks" folder or anything else inside it.
    If you didn't find the files or you're not sure about the identification, post what you found.
    If in doubt, or if you have no backups, change nothing at all.
    The trouble may have started when you downloaded and ran an application called "MPlayerX." That's the name of a legitimate free movie player, but the name is also used fraudulently to distribute VSearch. If there is an item with that name in the Applications folder, delete it, and if you wish, replace it with the genuine article from mplayerx.org.
    This trojan is often found on illegal websites that traffic in pirated content such as movies. If you, or anyone else who uses the computer, visit such sites and follow prompts to install software, you can expect more of the same, and worse, to follow. Never install any software that you downloaded from a bittorrent, or that was downloaded by someone else from an unknown source.
    In the Security & Privacy pane of System Preferences, select the General tab. The radio button marked Anywhere  should not be selected. If it is, click the lock icon to unlock the settings, then select one of the other buttons. After that, don't ignore a warning that you are about to run or install an application from an unknown developer.
    Then, still in System Preferences, open the App Store or Software Update pane and check the box marked
              Install system data files and security updates (OS X 10.10 or later)
    or
              Download updates automatically (OS X 10.9 or earlier)
    if it's not already checked.

  • Trying to display a pdf inline, in a new window.

    Hello
    I have a servlet with the following html button.
    <FORM NAME=download ACTION=/servlet.ShowReportServlet METHOD=get>
    <INPUT TYPE='submit' VALUE='Display Report A' NAME='Report'>
    When this button is pressed, a pdf file is displayed via the following code
    // Store the uploaded file size
         int filesize = bis.available();
         // Set content type to application/pdf for Adobe Acrobat Reader
         response.setContentType("application/pdf");
         // Content-Disposition is a field to specify presentation of
         // entity or file name (incase Acrobat Reader plug-in not installed)
         response.setHeader(
              "Content-Disposition",
              "inline; filename=\"" + fileToUpload + "\"");
         // Do not cache the pdf file
         response.setHeader("Cache-Control", "no-cache");
         // Set the content length
         response.setContentLength(filesize);
         // Upload the file to the client
         ServletOutputStream sos = response.getOutputStream();
         int data;
         while ((data = bis.read()) != -1) {
              sos.write(data);
    My problem is that I can't work out how to display the pdf in a new browser window.
    Any help would be greatly appreciated.
    Thankyou.

    Thanks for pointing me in the right direction DrClap.
    We ended up with the following html (in an HttpServletResponse):
    <FORM NAME=download ACTION=/servlet.ShowReportServlet METHOD=get TARGET="ReportWindow">
    <INPUT TYPE='submit' VALUE='Display Report A' NAME='Report' OnClick="window.open('','ReportWindow','height=530,width=550,menubar=0,resizable=1,scrollbars=1, status=0,titlebar=0,toolbar=0,left=300,top=100')">

  • 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

  • It is necessary for me to have more than one window open in Firefox, and the command (New Window) no longer works. How do I have two different websites open at the same time on separate displays?

    I used to be able to open two Firefox windows at a time, with one website on one display and another website on another display. Now when I select New Window, nothing happens.

    You can tear off a tab (right-click: Move to New Window) to open it in another window and resize both windows so you see them at the same time.
    *Fox Splitter: https://addons.mozilla.org/firefox/addon/fox-splitter/
    *Split Pannel: https://addons.mozilla.org/firefox/addon/split-pannel

  • Can you force a link inside a .pdf to open the "linked to" document in a new window?

    When I have a link inside my .pdf document - linking to another .pdf document or to a Word document - how can I force the linked-to document to open in a new window?
    I have a web site (business internal, so unfortunately I cannot point to it).  My HTML menu has links to .pdf documents - no problem.  However, once I open those .pdfs, they contain links to other .pdfs and to Word documents.  Clicking on these links, which reside inside my .pdfs, opens the "linked-to" docs in the same page.  How can I force them to open in a brand new frame?
    All of my .pdfs were originally created in Word, and in the Word versions, the links DO open into new frames.  I am not sure why, when I convert them to .pdfs, they lose this feature.
    Can anyone help?

    Hi Magenta,
    Would you mind reposting this question over on the Acrobat boards?  You've posted in the AIR forum and you'll have better luck with this over there.
    Thanks,
    Chris

  • Opening document in new window

    I've added a button to the online help toolbar in the Skin
    Editor and created a link to the manual in the Action Tab. I
    compiled the help and when I select the button, the document comes
    up in the topic pane window in the online help. I want the document
    to open in a new window with the appropriate application (Word for
    .doc, Adobe Reader for .PDF, etc.). I think this requires some
    javascript but not sure. How would I go about doing this?
    Thanks in advance for your time.
    Bill

    Hi Bill
    I believe that how these documents open are dependent upon
    the settings for each PC viewing the page. For .PDF content, each
    user has the ability to configure the settings for their PDF reader
    to choose between whether PDF files open in the browser or in the
    PDF reader. Additionally, browser add ins may have a role too. For
    example, I use FireFox as my primary browser. I have an add in for
    FireFox that allows me to choose what happens when I click a link
    that opens a PDF. The add in prompts me for my desired action.
    I believe Word is similar, but I'm not sure where you would
    go to change the behavior of how it opens. But I do believe there
    is a setting on each Windows install that governs how Word
    documents are handled when opened from a link on a web page.
    Actually, I just conducted a Google search and here is a link
    or two that you may find interesting.
    Link regarding Word
    Documents
    Link regarding
    PDF Documents
    Hopefully this helps... Rick

  • Opening new links in a new window from a pdf document

    Is there a setting I can set it up for new pdf documents that are linked in a pdf document to open in a new window.

    Cannot.

  • How to open links from document library in a new window?

    I have a column called "Links" in document library, i want to open those links in a new window. Please guide me on this how to achieve this.
    Thanks
    Ramanjulu Naidu N

    hi,
    See whether these links help you -
    http://preachingsharepoint.blogspot.com/2012/06/open-document-in-new-window-from.html
    http://stackoverflow.com/questions/5119919/sharepoint-links-how-to-open-in-new-tab-window
    http://www.benramey.com/2011/04/25/opening-all-sharepoint-2010-documents-in-a-new-window/
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/9db08c4a-b53c-419a-84f8-001c194d1311/how-to-open-sharepoint-document-library-pdf-file-in-new-window?forum=sharepointadminlegacy
    http://www.andrewconnell.com/Adding-OpenInNewWindow-option-to-SharePoint-Links-lists
    http://www.uccorner.com/32/sharepoint/sharepoint-open-links-in-new-window/
    Hope this helps!
    MCITP: SharePoint 2010 Administrator
    MCTS - MOSS 2007 Configuring, .NET 2.0
    | SharePoint Architect | Evangelist |
    http://www.sharepointdeveloper.in/
    http://ramakrishnaraja.blogspot.com/

  • Open an on demand sub report in a new window

    Hi There!
    While reading the forum threads, there is an thread that have the same issue that i want to find out, but the thread is not yet answered. Could you guys help me. Thanks!
    Thread by: Kylie Edwards  
    Hi I am wondering if it is possible to open an on demand sub report in a new window.
    I have a report that has 6 level drill and I want to be able to close the information in the sub report to give the end user the ability to keep drilling.
    I have tried inserting a text box with a hyper link back to the main report but hyper links do not seem to work the subreport. "
    Thanks and Regards,
    Joni

    Hi all,
    Sorry for the late reply, and thank you guys for the helped. I manage to solve the problem myself
    To Falk:
    Ya you are right, for what i know,  Inforview is not possible to open a subreport from a RPT file in a new windows as well.
    To Wallie Cheng :
    When i posted the question for help, i just want to know if i could display a crystal report on a new window.
    My situation is that i have a page that is size 3in x 3in ( Just a small static graph ) and i wanna attached a A4 report. In order to have a nicer view at inforview ( 3in x 3in border box ), i will need to reduced the size of the crystal report. The size of the main report is now properly change, but it affects the view for the sub report ( As subreport is A4 size, the system display the A4 size document in a serveral 3in x 3in page. -_-"' ).
    To Abhishek:
    I wanna try out your solution, but i can't find the hyperlink tab in perference option ( in inforview ).
    I manage to solved my problem (suitation that i have explain to Wallie Cheng ). That is to created a hyperlink to the report. Rather than a subreport link.
    Thanks and Regards,
    Joni

  • Word hyperlinks converted to PDF-open in new window???

    I currently use Word 2007 to build indexes with hyperlinks and convert to PDF using Adobe Professional 9. I know how to set my Adobe preferences so that hyperlinks open in a new window, but I want to set this on the document level for each index I create. I also know how to set each link within the final pdf to open in a new window (if I go through each and every link preference).  I must create the hyperlinks in Word as there are many instances that my indexes change prior to distribution of the discs and I don't like having to duplicate, triplicate, etc. my linking process in Adobe as some of my indexes contain 300+ links. I only know of JavaScript but not enough to use with confidence...  I want the hyperlinks to open in new windows (as that has always been my instructions to the end user) without the end user having to fumble around with their systems and settings. It has just been brought to my attention that my discs do not have that function set. Meaning, that what I view and test on my system is not the same as the end user. The hyperlinks open in the same window (dang it!!). I did see a JavaScript solution but keep getting an error (on line 2). Here is the JavaScript I found in the forum: app.openInPlace = false;   //Opens cross-document links in separate windows.
    So, I have muliple questions...
    Is this sript the best way to accomplish the document level open in a new window function?
    Is this script written correctly? (I did cut and paste this script within the brackets)
    If I use the JavaScript and save, does that save in the Adobe application system or just on the document level?  And then how do I delete if it doesn't work properly?
    What other functions can you suggest I try?
    Any suggestions would be helpful!

    Where did you place that script, exactly?
    It should work, there's probably just an error in how you added the text of the script. Try removing the comment so that there's only one line of code:
    app.openInPlace = true;
    Note that this changes the user preference, which is generally frowned upon, so you should endeavor to set it back to what it was in the first place when the document is closed. This would involve storing the value of this property when the document opens, change it if necessary, and restore it when the document closes. It also won't work for those users who have JavaScript disabled.
    Unfortunately, link annotations are difficult to alter in an automated way given what's available in Acrobat. It would be possible with an Acrobat plug-in to make document-wide changes to all of the links, but I'm not aware of any that do this. You might want to search around.

  • Pdf in new window

    Hi ,
    i have read PDF from DB and set
    response.setContentType("application/pdf");
    response.setContentLength(bytes.length);
    in action class of struts.
    I have one success page .Once the request is processed , pdf gets open. but in same window. Please suggest me how to open the generated PDF type in new window.

    It's too late to open a new window once the request is processed. You can open a new window from the html that links to the pdf by setting the href target to _blank. JavaScript can also open new windows.                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for