1 Reply Latest reply on Sep 7, 2013 10:26 AM by heathrowe

    Click button and having an image show up in its own page

    deecaadf

      Silly question, I know, but can't figure it out in Edge. I created a hot spot over an image and when it's clicked I want an image to show up in it's own browser window.

       

      Example: http://bydeadface.com/tonystorture.html

       

      Click on any of those images and you will see that the browser automatically opens a new page with the raw image. I want to do that.

       

      I made this one in dreamweaver and all I did was set the button to link to the image in a new window. The native browser took care of the rest. I like that because I don't want or need to create a whole new Edge document to display the photo.

       

      Suggestions?

       

      Thank you.

        • 1. Re: Click button and having an image show up in its own page
          heathrowe Most Valuable Participant

          OnClick

           

          ////////////////////////

           

          window.open("images/nameofimage.jpg", "_blank");

           

          ///////////////////////

           

          When you import assets such as images, they go directly to the images folder relative to the project, so in the above simply substitute what I have with the name of the image you want to poen. Use _blank as the second parameter to open in its own window.

           

           

          For a dynamic option, without having to reference the source explicitedly, you can use

           

          ////////// Click ////////////

          window.open($(e.target).attr('src'), "_blank");

          /////////////////////

           

          hth

          Darrell

          1 person found this helpful