Welcome to WebmasterWorld Guest from 50.17.74.162

Forum Moderators: open

Message Too Old, No Replies

Opera and a Blur / Focus problem

     

tedster

1:32 pm on Jan 16, 2002 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I have several sites which use informationsl pop-ups, activated by a link. There can be problems with users "losing" the pop-up and having it load behind the window stack, invisible to them. So in some cases (especially when don't declare a different window name on each link) I start the HTML for the pop-up with:

<body onBlur="self.focus()">

Opera does not respond to this at all. Does anyone know why? Is there a work-around?

tedster

6:30 pm on Jan 16, 2002 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



It's been a long time since I actually checked this function -- it doesn't work in Explorer 6 either. Oh, well. It was nice while it lasted.

bruhaha

7:29 pm on Jan 16, 2002 (gmt 0)

10+ Year Member



Not sure of the issue with Opera --can't reproduce it--but you might try substituting

<body onLoad="window.focus()">

This allows for the window to lose focus and stay in the background, but when you load a new pop-up (in the same window, since you didn't declare a different window name), the window will come to the front again.

This is, of course, a bit different from the behavior you have now, which forces the popup to stay on top. If you want to keep that (in the other browsers), you might try using both the onLoad and onFocus events in the body tag.

tedster

7:50 pm on Jan 16, 2002 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



That's a good suggestion. It still keeps things user-friendly.

Thanks.