Closed Thread Icon

Preserved Topic: check if the window is already open Pages that link to <a href="https://ozoneasylum.com/backlink?for=18052" title="Pages that link to Preserved Topic: check if the window is already open" rel="nofollow" >Preserved Topic: check if the window is already open\

 
Author Thread
kars10
Bipolar (III) Inmate

From: Europe
Insane since: Mar 2001

posted posted 06-11-2001 18:48

well, guys, I thought I already read a topic about that subject and I serached, but nope, not found.
Anywho:
I am in this situation.
window A opens a new window named B, right;
window A moves back (.blur()) and B gets the attention (.focus());
(why am I using those ; all the time?)
Then I click back to window A and re-click on the link to open window B.
I want A to blur an B to focus again. some how it doesn't do that with my function here:

function newindow(url,name)
{
var nw=window.open(url,name);
nw=window.focus();
}

what's wrong or what am i missing?
k10



only change remains

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 06-11-2001 19:03

I don't think you meant to say nw=window.focus(); I think you meant nw.focus(); instead. What nw=window.focus() does, is focuses the current window, and gives the return value of that function (which is probably "true" if the focus succeeded and "false" if it didn't) and puts it into nw, which isn't what you intended.

kars10
Bipolar (III) Inmate

From: Europe
Insane since: Mar 2001

posted posted 06-11-2001 19:12

oh, I get it. it focuses the wrong window, huh?
ok, good thing you know what I intended, Slime. *g*
k10
PS:the voices in my head... is that you? *g*




only change remains

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 06-11-2001 20:56

Hey - are you reading about those pop behind windows for the camera ads? Me too!

« BackwardsOnwards »

Show Forum Drop Down Menu