Forum Moderators: open

Message Too Old, No Replies

New window not keeping on top

Despite use of <BODY onBlur=self.focus()>

         

kiwibrit

2:35 pm on Jun 12, 2006 (gmt 0)

10+ Year Member



I have a series of small images, which, when clicked, need to show a larger version of the new image in a new window. For the first image, this works easily, but, if the new window is not cancelled, the next image clicked resulting the larger image file going to the bottom of the stack.

I have tried using <BODY onBlur=self.focus()> in the body of the large-image file HTML. No difference in FF, works at first in IE6 - if a new image is selected, the large image appears in place of the old. However, if the original image is selected, the large-image file disappears to the bottom of the stack.

Any thoughts on how to correct this?

Code being used:

<head>
<script type="text/javascript">
<!--
function ClothWindow(theURL) {
Cloth_Window = window.open(theURL,"WindowLargeCloth", "width=300, height=472,scrollbars=no");
}
//-->
</script>
</head>
<body>
<a href="images/large-black.htm" title="Link to larger image in new window" target="_blank" onclick="ClothWindow(this.href);return false;"><img src="images/black.jpg" alt="black cloth" width="133" height="40" border="0"></a>
<a href="images/large-white.htm" title="Link to larger image in new window" target="_blank" onclick="ClothWindow(this.href);return false;"><img src="images/white.jpg" alt="black cloth" width="133" height="40" border="0"></a>
</body>

kiwibrit

2:51 pm on Jun 12, 2006 (gmt 0)

10+ Year Member



Further to the above. I cleared temporary internet files in IE, and things behaved a little bit as they should. But then the large image stayed the same, no matter what small image was clicked. In Firefox 1.5.0.4, the new windows continue to dive under the stack after the first large image has been selected. Opera behaves very similarly to IE.

kiwibrit

3:36 pm on Jun 12, 2006 (gmt 0)

10+ Year Member



I have just ad my goalposts moved - the aim now is to be able to have a range of windows open - so that they can be moved around and compared one to another (the images are of cloth samples).

So I think my problem has gone away. That said, I would very much like to know if there was a way around it.

kiwibrit

8:11 pm on Jun 12, 2006 (gmt 0)

10+ Year Member



<body onLoad="self.focus();">
in the mark up of the large-image html cracked the problem outlined above.