none
Open PDF file in modal dialog RRS feed

  • Question

  • hi all,

    modal dialog does not show pdf files and other pages are opening in modal dialog but pdf getting problem to open in modal dialog

    here is my code 

     

     

    function ShowDialog(url, title) {

     

        var options = SP.UI.$create_DialogOptions();

        options.url = url;

        options.height = 300;

        options.width = 600;

        title: title;

            SP.UI.ModalDialog.showModalDialog(options);

    }

     

     

     

    HyperLink4.NavigateUrl = string.Concat("javascript:ShowDialog('C:\\AJAXDocumentViewer\\Windows-DeveloperGuide-ProfessionalEdition-4.6.pdf')");

                HyperLink4.Text = "Leave Application Form - Report";

                Image4.DescriptionUrl = URL1;

                Image4.ImageUrl = "~/sites/tapaltea/SiteAssets/LinkIcons/centraladmin_generalapplicationsettings_externalserviceconnections_32x32.png";

    Please help me out in this issue 

    Thank you

     


    BestRegards|SharePoint Techies
    Wednesday, October 19, 2011 11:05 AM

Answers

  • Please do mark the reply as answer, or add your solution if my replies did not help.


    Regards, Marijn Somers|| http://www.beyond-it.be || Twitter: http://twitter.com/marijnsomers || http://marijnsomers.blogspot.com
    • Marked as answer by Wasi Khan Saturday, October 22, 2011 12:16 PM
    Friday, October 21, 2011 11:22 AM

All replies

  • Why do you have code to open PDF files ?
    Regards, Marijn Somers|| http://www.beyond-it.be || Twitter: http://twitter.com/marijnsomers || http://marijnsomers.blogspot.com
    Thursday, October 20, 2011 6:36 AM
  • Thank your for your prompt reply, because i dont not want to use document library, i want to use local path. my file is in local drive which i want to open in modal dialogue 
    BestRegards|SharePoint Techies
    Thursday, October 20, 2011 6:47 AM
  • ok..so why don't you want to use a document library ?

    I mean..opening pdf documents is seamless, no need for code etc..


    Regards, Marijn Somers|| http://www.beyond-it.be || Twitter: http://twitter.com/marijnsomers || http://marijnsomers.blogspot.com
    Thursday, October 20, 2011 10:35 AM
  • basically my requirement is like we have oracle system that generate reports in specified drive from that path i want to show pdf in modal dialog and here is the url of report 

    HyperLink1.NavigateUrl = string.Concat("javascript: ShowDialog('http://orapps/dev60cgi/ifcgi60.exe?form=c:\\ora6i\\hris\\forms\\PR_LV_BALANCES_UPDATE.fmx&userid=payroll/payroll@oradb')");

    when user click on that link (hyperlink1) then popup open but show nothing the popup.

     

    but if i open this url in separate window its show that pdf file which i want to open in modal dialog 


    BestRegards|SharePoint Techies
    Thursday, October 20, 2011 11:14 AM
  • Hi,

     

    Here is a script to open files from a drive:

    http://javascript.internet.com/forms/file-open.html


    Regards, Marijn Somers|| http://www.beyond-it.be || Twitter: http://twitter.com/marijnsomers || http://marijnsomers.blogspot.com
    Friday, October 21, 2011 6:01 AM
  • Thanks marijn for your reply, i have solved the problem and i appreciate your time that you given me 

     

    Thanks 

    Regards


    BestRegards|SharePoint Techies
    Friday, October 21, 2011 10:32 AM
  • Please do mark the reply as answer, or add your solution if my replies did not help.


    Regards, Marijn Somers|| http://www.beyond-it.be || Twitter: http://twitter.com/marijnsomers || http://marijnsomers.blogspot.com
    • Marked as answer by Wasi Khan Saturday, October 22, 2011 12:16 PM
    Friday, October 21, 2011 11:22 AM
  • hi,

    Can you please post the solution i am facing the same problem.

    Regards

    Sairam

    Tuesday, June 5, 2012 2:14 PM