|
|
Please consider registering: registration is fast, easy and free! Benefits of registration:
- Free advertising for your website: Every post in our forums goes towards a "credit" of ads, which are displayed on most pages of our forums. Each post gives you 400 ad impressions. To submit your ad, edit your profile.
- Discount at TemplateMonster: All our members enjoy a 10% discount at TemplateMonster.com!
|
- Private Messages: Exchange private messages with other members of the forums.
- Message Tracking/Subscription: phpBB enables you to subscribe to threads which interest you, and will then email you when a reply is posted. phpBB also remembers which posts registered users have read during a session, which means you can keep track of which posts you have already looked at.
|
|
| Author |
Message |
Iyonix
WebHelper


Joined: 12 Nov 2002
Posts: 88
Location: Yarm, England
|
Posted:
Wed Jan 29, 2003 9:33 pm (10 years, 3 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: 57
Location: UK
|
Posted:
Thu Jan 30, 2003 3:49 pm (10 years, 3 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: 88
Location: Yarm, England
|
Posted:
Thu Jan 30, 2003 4:26 pm (10 years, 3 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: 57
Location: UK
|
Posted:
Thu Jan 30, 2003 4:45 pm (10 years, 3 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: 88
Location: Yarm, England
|
Posted:
Thu Jan 30, 2003 4:52 pm (10 years, 3 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: 88
Location: Yarm, England
|
Posted:
Thu Jan 30, 2003 5:10 pm (10 years, 3 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.064055 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
|