|
Author |
Message |
Iyonix
WebHelper
Joined: 12 Nov 2002
Posts: 82
Location: Yarm, England
|
Posted:
Wed Jan 29, 2003 9:33 pm (21 years, 2 months ago) |
|
Hi.
Can you help me with this:
I want javascript to opena window if the window called "newmessage" isn't allready open. I know how to open the window, but not how to make it not open if it is allready open.
Thank you, |
________________________________ Iyonix |
|
|
|
Hertzsprung
WebHelper
Joined: 30 Jul 2002
Posts: 56
Location: UK
|
Posted:
Thu Jan 30, 2003 3:49 pm (21 years, 2 months ago) |
|
Iyonix wrote: | Hi.
Can you help me with this:
I want javascript to opena window if the window called "newmessage" isn't allready open. I know how to open the window, but not how to make it not open if it is allready open.
|
Could you use a hidden input field, or perhaps just a javascript variable as a flag indicating if the window has been opened. In your window opener function, set this flag to true the first time the window is opened. After that, the function looks at the flag and does not open the window again.
Hope that helps,
Hertzsprung |
|
|
|
|
Iyonix
WebHelper
Joined: 12 Nov 2002
Posts: 82
Location: Yarm, England
|
Posted:
Thu Jan 30, 2003 4:26 pm (21 years, 2 months ago) |
|
Hertzsprung wrote: | Iyonix wrote: | Hi.
Can you help me with this:
I want javascript to opena window if the window called "newmessage" isn't allready open. I know how to open the window, but not how to make it not open if it is allready open.
|
Could you use a hidden input field, or perhaps just a javascript variable as a flag indicating if the window has been opened. In your window opener function, set this flag to true the first time the window is opened. After that, the function looks at the flag and does not open the window again.
Hope that helps,
Hertzsprung |
Thanks, But that wouldn't know if the window has been closed though. |
________________________________ Iyonix |
|
|
|
Hertzsprung
WebHelper
Joined: 30 Jul 2002
Posts: 56
Location: UK
|
Posted:
Thu Jan 30, 2003 4:45 pm (21 years, 2 months ago) |
|
Iyonix wrote: | Hertzsprung wrote: |
Could you use a hidden input field, or perhaps just a javascript variable as a flag indicating if the window has been opened. In your window opener function, set this flag to true the first time the window is opened. After that, the function looks at the flag and does not open the window again.
Hope that helps,
Hertzsprung |
Thanks, But that wouldn't know if the window has been closed though. |
Ah yes, good point. Could you use an onunload event handler? But you probably couldn't update the flag because it would be accessible only by the main page, not the popuop page...
Okay, you've got me stumped. Why do you want to do this, anyway? |
|
|
|
|
Iyonix
WebHelper
Joined: 12 Nov 2002
Posts: 82
Location: Yarm, England
|
Posted:
Thu Jan 30, 2003 4:52 pm (21 years, 2 months ago) |
|
Hertzsprung wrote: | Iyonix wrote: | Hertzsprung wrote: |
Could you use a hidden input field, or perhaps just a javascript variable as a flag indicating if the window has been opened. In your window opener function, set this flag to true the first time the window is opened. After that, the function looks at the flag and does not open the window again.
Hope that helps,
Hertzsprung |
Thanks, But that wouldn't know if the window has been closed though. |
Ah yes, good point. Could you use an onunload event handler? But you probably couldn't update the flag because it would be accessible only by the main page, not the popuop page...
Okay, you've got me stumped. Why do you want to do this, anyway? |
A frame auto refreshes to check if the user has any new messages. If they do it opens the message window. I don't want it to open the window again if they get another message and it is allready open. |
________________________________ Iyonix |
|
|
|
Iyonix
WebHelper
Joined: 12 Nov 2002
Posts: 82
Location: Yarm, England
|
Posted:
Thu Jan 30, 2003 5:10 pm (21 years, 2 months ago) |
|
Can anyone else help please?
I expect it will be some JS code. I am continuing to search on Google but to no avail |
________________________________ Iyonix |
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.135256 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
|