By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,028 Members | 1,051 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,028 IT Pros & Developers. It's quick & easy.

How can I make window appear and go away

P: n/a

Hi,

I my Javascript I popup an authentication window using the command;
unamePasswdWindow = open("auth.html","","width=500,height=100");

This works fine in IE, and in Firefox 2.x on Windows and Linux, but the
open() just returns a null in Firefox 1.5 on Tru64 Unix.

Later in the program I try to close the window using;

unamePasswdWindow.close();

In IE this works just fine and the window disappears, but in Firefox 2.x
on windows the window sticks around. Until I raise it to the top by
clicking in it. Then it disappears.

Anyone have any suggestions on these 2 problems? The window opening on
Tru64 is just an annoyance since I doubt if I will have any customers
with that environment. But the window not going away in Firefox is a
more serious problem.

Thanks

Howard
Feb 26 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
ASM
Howard Rifkin a écrit :
>
Hi,

I my Javascript I popup an authentication window using the command;
unamePasswdWindow = open("auth.html","","width=500,height=100");

This works fine in IE,
In IE6 probably ?
Because I doubt with IE7.
and in Firefox 2.x on Windows and Linux,
Because you didn't explain to your FF to open popups in a tab ...
but the
open() just returns a null in Firefox 1.5 on Tru64 Unix.
Don't know what it is.
Later in the program I try to close the window using;

unamePasswdWindow.close();

In IE this works just fine and the window disappears, but in Firefox 2.x
on windows the window sticks around.
Works fine : Always with IE6, or is it with IE 7 ?
Until I raise it to the top by
clicking in it. Then it disappears.
re-install Windows :-)

Which extensions has your FF ?
The AddBlock is actived ?

Perhaps could you try
unamePasswdWindow.focus();
unamePasswdWindow.close();

or
if(unamePasswdWindow && !unamePasswdWindow.closed)
unamePasswdWindow.close();
But the window not going away in Firefox is a
more serious problem.
It is very strange indeed.
Can't get same scenario.

What do your special browsers with :
http://stephane.moriaux.perso.orange...ui_non/f_0.htm
(take care that page will try to resize its window)

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Feb 26 '07 #2

P: n/a
"ASM" <st*********************@wanadoo.fr.invalidwrote in message
news:45**********************@news.orange.fr...
What do your special browsers with :
http://stephane.moriaux.perso.orange...ui_non/f_0.htm
(take care that page will try to resize its window)
Do you not confuse yourself by using:

http://stephane.moriaux.perso.orange.fr/

....and...

http://perso.orange.fr/stephane.moriaux/

....? Just wondering. : )

-Lost
Feb 26 '07 #3

P: n/a
ASM wrote:
Howard Rifkin a écrit :
>>
Hi,

I my Javascript I popup an authentication window using the command;
unamePasswdWindow = open("auth.html","","width=500,height=100");

This works fine in IE,

In IE6 probably ?
Because I doubt with IE7.
Works fine with IE 7
>
>and in Firefox 2.x on Windows and Linux,

Because you didn't explain to your FF to open popups in a tab ...
I don't want to open it in a tab in this case, but how would I do that?

>but the open() just returns a null in Firefox 1.5 on Tru64 Unix.

Don't know what it is.
>Later in the program I try to close the window using;

unamePasswdWindow.close();

In IE this works just fine and the window disappears, but in Firefox
2.x on windows the window sticks around.

Works fine : Always with IE6, or is it with IE 7 ?
IE 7
>Until I raise it to the top by clicking in it. Then it disappears.

re-install Windows :-)

Which extensions has your FF ?
The AddBlock is actived ?
Extensions? The popup blocker is activated but popups are allowed from
this site
>
Perhaps could you try
unamePasswdWindow.focus();
unamePasswdWindow.close();

or
if(unamePasswdWindow && !unamePasswdWindow.closed)
unamePasswdWindow.close();
Tried that with no effect, also tried;

unamePasswdWindow.close();
unamePasswdWindow.focus();
>But the window not going away in Firefox is a more serious problem.

It is very strange indeed.
Can't get same scenario.

What do your special browsers with :
http://stephane.moriaux.perso.orange...ui_non/f_0.htm
(take care that page will try to resize its window)
Seems to work fine. I can open f1 and f2 from the main window and close
f1 from f2 and f2 from f1. The close take place instantly.

Thanks

Howard
Feb 27 '07 #4

P: n/a
ASM
Howard a écrit :
ASM wrote:
>Howard Rifkin a écrit :
>>>
and in Firefox 2.x on Windows and Linux,

Because you didn't explain to your FF to open popups in a tab ...

I don't want to open it in a tab in this case, but how would I do that?
It is the user who fix that in preferences of his brower.
Programmer can do nothing about this choice.
>What do your special browsers with :
http://stephane.moriaux.perso.orange...ui_non/f_0.htm
(take care that page will try to resize its window)

Seems to work fine. I can open f1 and f2 from the main window and close
f1 from f2 and f2 from f1. The close take place instantly.
So there is something else in your code that doesn't please to FF
Opening-n-closing FI F2 are very similar to what you gave as code
(except in my demo we have a little more difficulty : we pass by opener)

Don't you open twice (or more) your popup ?
Function to avoid to open more than once the popup :

function newPop(page) {
if(typeof(truc')=='undefined' || !truc || truc.closed)
truc = window.open('','','width=300,height=100');
truc.location = page;
truc.focus();
}
function closePop() {
if(typeof(truc')!='undefined' && !truc.closed)
truc.close();
else alert('no popup to close !');
}

--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Feb 27 '07 #5

P: n/a
ASM
-Lost a écrit :
>
Do you not confuse yourself by using:

http://stephane.moriaux.perso.orange.fr/

...and...

http://perso.orange.fr/stephane.moriaux/
I don't think so.
1st one has favicon in FF
2nd has not
The alone problem is that external css and ssi do not use same root
path, to use one url or other a ssi could fix it.
--
Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date
Contact : http://stephane.moriaux.perso.wanadoo.fr/contact
Feb 27 '07 #6

P: n/a
I tried the code fragment to prevent multiple opens and closes but that
did not help. It must be something subtly wrong in my code.

Thanks

Howard
ASM wrote:>
So there is something else in your code that doesn't please to FF
Opening-n-closing FI F2 are very similar to what you gave as code
(except in my demo we have a little more difficulty : we pass by opener)

Don't you open twice (or more) your popup ?
Function to avoid to open more than once the popup :

function newPop(page) {
if(typeof(truc')=='undefined' || !truc || truc.closed)
truc = window.open('','','width=300,height=100');
truc.location = page;
truc.focus();
}
function closePop() {
if(typeof(truc')!='undefined' && !truc.closed)
truc.close();
else alert('no popup to close !');
}
Feb 28 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.