No announcement yet.

How can I open a pdf file in a popup window?

  • Filter
  • Time
  • Show
Clear All
new posts

    How can I open a pdf file in a popup window?

    This can be done using the 'Advanced Link' option on the 'Links' panel of a product or 'Link' option on a fragment:
    • Save your PDF in your Site folder
    • In the 'Links' panel, tick the 'Advanced Link' box ('Link' box on a fragment)
    • Select the 'URL' radio button
    • Paste the following in the URL field:
      javascript:ShowPopUp('MyFile.pdf', 500, 600);
    • where 'MyFile.pdf' is the filename, '500' the width and '600' the height of the popup window
    • Enter the text to display as the link in the 'Link Text' field
    • On the 'General' panel, enter [LINK] into the 'Full Description' field on a product or 'Text' field on a fragment. This is replaced by the text in the 'Link Text' field
    • Click 'Apply'
    • To ensure that your file is uploaded to the site add it into the 'Design | Additional Files' list
    • Update your site.

    If you are already using the Advanced links and want to include this separately, you can add the following directly into the 'Full Description' field for a product or 'Text' field for a fragment:

    !!<<a href="javascript:ShowPopUp('MyFile.pdf', 500, 600);">Click here</a>>!!