dlowery
01-26-2003, 06:31 PM
I have a family website, several pages of which display thumbnails of photos. The user can enlarge the image by clicking on a thumbnail (duh!). The enlarged image appears in a pop-up window; size and position are under control, thanks to JS. The USER can EXIT the window (close it) by clicking on the image. This works very well and time is not wasted to re-load the thumbnails after every view.
The problem arises! The thumbnail page, at least a part of it, is always in view. Sometimes the user neglects to close the pop-up, moves the mouse pointer to the parent window and clicks on a new thumbnail. This action loads the new image into the same pop-up and buries the window under the parent. I solved the bury problem with the focus method but I haven't found a way to launch a new pop-up.
What I would like to do, ideally, is close a pop-up if it exists and launch the new pop-up.
What I have tried:
onblur="window.close()";
When pop-up is launched, test for existing window and close it, then launch new window.
Use a unique image ID (this exists) to create a unique windowname variable. This gets very complicated! My experiments failed.
I also experimented with the 'replace' parameter in window.open() but I was in over my head on that one.
There is probably a simple and easy solution but I either don't know how to look for it, or my brain seeks only the complicated answer!
If you have any suggestions, boy wouldn't I love it!!!??
The problem arises! The thumbnail page, at least a part of it, is always in view. Sometimes the user neglects to close the pop-up, moves the mouse pointer to the parent window and clicks on a new thumbnail. This action loads the new image into the same pop-up and buries the window under the parent. I solved the bury problem with the focus method but I haven't found a way to launch a new pop-up.
What I would like to do, ideally, is close a pop-up if it exists and launch the new pop-up.
What I have tried:
onblur="window.close()";
When pop-up is launched, test for existing window and close it, then launch new window.
Use a unique image ID (this exists) to create a unique windowname variable. This gets very complicated! My experiments failed.
I also experimented with the 'replace' parameter in window.open() but I was in over my head on that one.
There is probably a simple and easy solution but I either don't know how to look for it, or my brain seeks only the complicated answer!
If you have any suggestions, boy wouldn't I love it!!!??