On focusout close window

message from VBASP on 20 Jul 2004
I have a couple of question I hope can be answered.

1) When you do a window.open you are limited to what that window can do.
What I have is 5X6 table of thumbnail pictures. Currently when you click
on the thm picture it would bring up a high rez picture in a half screen
window this is being done with window.open. What I want is, if you click on
the high rez picture window it will close that window returning you to the
main web page. I would also like that if the focus is taken off the high rez
picture window that the window would also close automaticlly.

2) I'm really new to this, are there commands that can be attached to
buttons on a web page that would act like you hit the BACK button on the
browser. Like this.previous or something like it. Is so what would I look
under in the future to find them.

Thanks so much for your time.
 
Josh Johnson replied to VBASP on 20 Jul 2004
The function you need to close the popup is "window.close();" and you
need to attach that function to two events: (1) On the image, add an
onclick event [onclick="window.close();"], and (2) on the body add an
onblur event. [onblur="window.close();"]

- Josh
 

Archived message: On focusout close window (Macromedia Dreamweaver Web Design)