none
How to Open a Selected Document in a Modal Dialog? RRS feed

  • Question

  • Hi,

    How to Open a Selected Document in a ModalDialog?

    When I Select a Document Or Pdf in the Document Library and i click on a Custom Button in a Ribbon I need to open the selected Document in the ModalDialog .

    Placing The Custom Button in the Ribbon and selecting the Document i can open a pop Up with Document Details but i want to open the Document in the Modal Dialog.

    Can Anyone Please Suggest me How it can be done?

     

    Thanks!

    Friday, December 23, 2011 10:21 AM

Answers

  • Hi,

    Can you be more specific on this

    "One way could be to created html content of pdf and word file".

    Thanks!

    You would need to find, or create, a program that can convert those files into HTML.  This is not an easy task, as HTML doesn't have the ability to do everything that those file types can, but you can often get close with simple versions of those files.  Once you have HTML content, rather than byte data in some other format, you can display it in a modal dialog box.
    • Marked as answer by Shimin Huang Wednesday, December 28, 2011 7:42 AM
    Friday, December 23, 2011 3:16 PM

All replies

  • I guess that wont be feasible solution. Because few files open in browser and few not. The one which open can you embedded inside dialog. But one's which will not be embedded will be automatically downloaded.

    One way could be to created html content of pdf and word file. This content will be rendered in the modal dialog box.

     


     

    Regards,
    Milan Chauhan

    Friday, December 23, 2011 11:48 AM
  • Hi,

    Can you be more specific on this

    "One way could be to created html content of pdf and word file".

    Thanks!

    Friday, December 23, 2011 1:31 PM
  • Hi,

    Can you be more specific on this

    "One way could be to created html content of pdf and word file".

    Thanks!

    You would need to find, or create, a program that can convert those files into HTML.  This is not an easy task, as HTML doesn't have the ability to do everything that those file types can, but you can often get close with simple versions of those files.  Once you have HTML content, rather than byte data in some other format, you can display it in a modal dialog box.
    • Marked as answer by Shimin Huang Wednesday, December 28, 2011 7:42 AM
    Friday, December 23, 2011 3:16 PM