Popup to open so you can see all images.

Discussion in 'JavaScript' started by The Driver, Aug 2, 2006.

  1. #1
    Hey man! I wanna know something. When I click an image, I want a popup window to open where you can see all images, know what I'm saying? What I want is that the user can be able to choose what image to look at, if you don't know what I'm talking about head to this site:
    http://www.hype.se/recension/sonypsp/miamivicethegame
    Now click on an image there, and you'll know what I'm talking about. So how do I make it work?

    Thanks for replying.
     
    The Driver, Aug 2, 2006 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Just have a seperate html file with all the images, and on the main page, just do a javascript popup window on the onclick event.
     
    ccoonen, Aug 2, 2006 IP
  3. The Driver

    The Driver Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hey man! Thanks for answering my question. I think I know what you mean, but how do I make a javascript popup window on the onclick event? As you can see I'm a totally newbie.

    Thanks for replying.
     
    The Driver, Aug 3, 2006 IP
  4. AnimeGround

    AnimeGround Guest

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    you add to the images onclick="openImage('urloftheimage or html containing the image','My_Images');"

    And make a javascript fonction and add it between the head:

    <head>
    <style type='text/javascript'>
    <!--
    function openImage(url,desc) {
    window.open(url,desc);
    }
    //-->
    </script>
     
    AnimeGround, Aug 3, 2006 IP