Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / February 2007



Tip: Looking for answers? Try searching our database.

How can I make window appear and go away

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Howard Rifkin - 26 Feb 2007 19:59 GMT
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
ASM - 26 Feb 2007 20:25 GMT
Howard Rifkin a écrit :

> Hi,
>
[quoted text clipped - 3 lines]
>
> 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)

Signature

Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date

-Lost - 26 Feb 2007 21:46 GMT
> 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)

Do you not confuse yourself by using:

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

...and...

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

...?  Just wondering.  : )

-Lost
ASM - 27 Feb 2007 22:13 GMT
-Lost a écrit :

> Do you not confuse yourself by using:
>
[quoted text clipped - 3 lines]
>
> 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.

Signature

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

Howard - 27 Feb 2007 14:01 GMT
> Howard Rifkin a écrit :
>>
[quoted text clipped - 8 lines]
> 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.
>
[quoted text clipped - 8 lines]
>
> 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();
[quoted text clipped - 3 lines]
>   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.
>
[quoted text clipped - 4 lines]
> 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
ASM - 27 Feb 2007 14:14 GMT
Howard a écrit :
>> Howard Rifkin a écrit :
>>>
[quoted text clipped - 3 lines]
>
> 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.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.

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 !');
}

Signature

Stephane Moriaux et son (moins) vieux Mac déjà dépassé
Stephane Moriaux and his (less) old Mac already out of date

Howard - 28 Feb 2007 14:25 GMT
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
[quoted text clipped - 15 lines]
> else alert('no popup to close !');
> }
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.