Closing a pop-up window without Java

Discussion in 'HTML & Website Design' started by Blame Me, Jan 30, 2007.

  1. #1
    Small problem that I would like to work out.

    I have a set of images I would like to open in a new pop-up window and then click through them one after each other or go back to a previous image. I have this working by using the small section of code (se below), the bold bit opens the window:

    <a href="LINK" onClick="popup = window.open('LINK', 'PopupPage', 'height=500,width=500,scrollbars=yes,resizable=yes'); return false" target="_blank" title="LINK">Link to page or image</a>

    In each page of the resulting pop-up is the small section of code to close the window (see bleow), the bold bit should close the window - I think :confused:

    <A href="LINK BACK" >Previous</A> | <A href="#" onClick="popup = window.close()">Close Window</A> | <A href="LINK NEXT" >Next</A>

    The problem I have is how to close the window (without using Java or a button).

    The window closes in Firefox, Safari, Netscape, Camino, Opera but not in IE.

    Any ideas? Is the code correct and I am missing something? This one has got me stumped.

    Link to the pop-up

    Thanks
     
    Blame Me, Jan 30, 2007 IP
  2. Ginger Ninja

    Ginger Ninja Guest

    Messages:
    161
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Instead of popup windows try using this;
    w w w . huddletogether.com/projects/lightbox2/ (remove spaces)

    Its much easier to implement and looks gorgeous!
     
    Ginger Ninja, Jan 30, 2007 IP
  3. Blame Me

    Blame Me Guest

    Messages:
    162
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Will it work on an IE browser that has java switched off!

    It looks fantastic BTW, but I have java switched off on my windows test machine so it won't work for me the way it will on my Mac.
     
    Blame Me, Jan 30, 2007 IP
  4. Ginger Ninja

    Ginger Ninja Guest

    Messages:
    161
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4
    For the answer to that you'll have to check the site i'm afraid. I haven't used it in months so can't really remember. Good luck though. =)
     
    Ginger Ninja, Jan 30, 2007 IP