Use One Window To View Multiple Thumbnails

Use the same window to view multiple images

The Problem:
I have a table with thumbnails.  When clicked, I have a new window open using, target="_blank".  Well and good.  Now, is there a way to re-use that newly opened window for the next image when a thumbnail is clicked?  Presently you must close that new browser window or another window opens.  Before long you've got many browser windows open and eventually must close them all.

The Solution:
JScript to the rescue

<script language="JavaScript">
var MyWin=0;
function oWin(url){
else MyWin.location.href=url;

Call it like this
<a href="JavaScript:oWin('Page.htm')">Link</a>

javascript reuse open windows

Back To Top
© 1998 - 2024
Version 7.21 | Advertise on this site