Announcement

Collapse
No announcement yet.

Opening a PDF in a popup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Opening a PDF in a popup

    I'm running 9.03 business.

    I want to add a 'click for a fact sheet' link within the product description which will open a pdf document in a popup window.

    I've played with the 'Links' and 'Extended Info' sections with little success.

    Would anyone know of an easy way to achieve this? My knowledge of html is all but non-existent!

    Many thanks.

    #2
    In the URL field, put your link in as normal and then add:

    " target="_blank

    after it.

    so you'd look something like:

    Code:
    http://www.mysite.co.uk/" target="_blank

    Comment


      #3
      Many thanks indeed for the info. I'm really grateful.

      Am I right in thinking that will open a new page? What I was hoping for was a popup with a set size (say, 800 x 800)

      Comment


        #4
        Why not say what you want from the start and save us both some time? It will open a new page yes but not to a specific size as you want, so you will need another avenue of attack.

        The script for a popup page to a set size is already created in actinic as it is one of the options used on the extended info pages. Take a look how that is done on the design tab for a product with extended info page selected and set size specified. You can just mimic that then in your product layout for the advanced link part of the layout.

        If only specific to a few products you could create a 2nd product layout that does this and leave the normal one as it is. You then select this 2nd product layout on those products where you wish to do this.

        Comment


          #5
          Here's how to do it using the Advanced Link.

          Save your PDF in your Site folder and make an extra copy in PreviewHTML.

          In the Links panel, check Advanced.

          Select the URL radio button.

          In the URL field paste
          Code:
          javascript:ShowPopUp('Paragon200.pdf', 500, 600);
          Where Paragon200.pdf is our filename, 500 the width and 600 the height.

          Finally go to Design / Additional Files and tell Actinic to upload the file (the Site folder one) there.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Originally posted by leehack View Post
            Why not say what you want from the start and save us both some time?

            Sorry for wasting your time Lee. As I mentioned, my knowledge of html is very poor and I thought a popup window was different from a new window.

            I'll try not to assume anything next time.

            Waggers

            Comment


              #7
              Norman, thank you.

              That works a treat!

              Waggers

              Comment


                #8
                Norman, very kindly, showed me a peice of javascript to get a pdf to open in a popup window from the link section.

                I'm now trying to achieve the same thing in a fragment. I currently have:

                !!<<a target="_blank" href="Truegrain.pdf">True-Grain</a>>!!

                which opens in a separate browser window.

                Could any kind soul tell me how to modify this line so it uses a popup window instead of a new window.

                I understand, from an earlier post, that my terminology may be at fault, so I hope I'm describing accurately what I'm trying to achieve. The popup window I'm needing would be produced by a bit of javascript.

                Many thanks guys.

                Waggers

                Comment


                  #9
                  Try this:

                  Code:
                  !!<<a href="javascript:ShowPopUp('Truegrain.pdf', 500, 600);">True-Grain</a>>!!

                  Comment


                    #10
                    Many thanks indeed Duncan.

                    Waggers

                    Comment


                      #11
                      Just what I needed!
                      Thanks Duncan!
                      Kind Regards
                      Sean Williams

                      Calamander Ltd

                      Comment


                        #12
                        I wish I had seen this a few week's ago, I have just spent ages trying to do exactly this! My fault I never thought of asking you guys.
                        Please with myself as I eventually came to the same result.
                        Benichembla Bob
                        Underfloor Heating
                        Electric Underfloor Heating
                        Under Floor Heating

                        Comment

                        Working...
                        X