Martin wrote:I've got a set of images as thumbnails, when I click on one it opens up a new window (only a small one) with the bigger size of that pic showing, should I click on another thumbnail before closing the window it displays the new image in the same window only now its not visible (unless you click on it on the taskbar). I want it so that when I click on a new window it brings that back to the front so the view can see it easily.
This is browser and OS controlled, by default it's a "first come first served" situation, although in my experience IE6 seems to overrule this at times especially so far as forms are concerned and Windows seems to forget about it full stop. One can alter this behaviour with TweakUI and prevent focus stealing.
Therefore, if you have a small window behind the main window, it should not come forward. One can see this action with Outlook Express, if you click a link in a message to open a new window and then click another link it opens in the same window but doesn't (usually) steal focus, yes?
I've tried searching for a piece of code for it but its just returning pop up scripts and the like
That'll be because it is exactly what you want. It is simply a popup script, which is not a "stick this in front of the browser if it's not already open" script. Generally a new poppy-up window will appear in front of the main window if it isn't already open unless it's been defined as a pop behind window. It's then generally not the script's problem if the window it's trying to open is behind the current window as it's only concerned with opening it. You may be able to get it to grab the focus but not really recommended IMO.