How can I make window appear and go away

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.fr/truc/popup_oui_non/f_0.htm
(take care that page will try to resize its window)
 
H

Howard Rifkin

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
 
A

ASM

Howard a écrit :
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.
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 !');
}
 
H

Howard

ASM said:
Howard Rifkin a écrit :

In IE6 probably ?
Because I doubt with IE7.

Works fine with IE 7
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?

Don't know what it is.


Works fine : Always with IE6, or is it with IE 7 ?

IE 7
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();
It is very strange indeed.
Can't get same scenario.

What do your special browsers with :
http://stephane.moriaux.perso.orange.fr/truc/popup_oui_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
 
H

Howard

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:>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top