SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Dec 2010
    Location
    Greenville, SC, USA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to open a jpg in a new window?

    Hello everyone,
    I want the user to be able to select a picture on my site and it open a .jpg or .gif into a new window. Then they can close that window and return to where they were originally on my site. Any help will be greatly appreciated.

    Thanks
    Wiley

  2. #2
    SitePoint Member
    Join Date
    Dec 2010
    Location
    Greenville, SC, USA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never mind, I got my answer. I searched in the "Just starting your Design" forum.

    Thanks anyway
    Wiley

  3. #3
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    targer=_blank

  4. #4
    SitePoint Zealot Imran-Saami's Avatar
    Join Date
    Sep 2004
    Location
    Pakistan-Dubai
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <a href="yourimagename.jpg" target="_blank">Image thumb</a>

  5. #5
    Non-Member
    Join Date
    Dec 2010
    Posts
    16
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, the standard method is to use a <a> tag with target="_blank" for the smaller image. I am pretty sure it will be useful for you because I also used it before.

  6. #6
    SitePoint Member
    Join Date
    Dec 2010
    Location
    Greenville, SC, USA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks everyone. That worked! But that brings up another question. Can I set a size for the new window that opens?

    Thanks
    Wiley

  7. #7
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,175
    Mentioned
    454 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by WTucker View Post
    that brings up another question. Can I set a size for the new window that opens?
    This is becoming a job for JavaScript, so thread moved to that forum.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •