473,326 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

verify popup window is open from multiple pages

Hi,

I've looked for a solution to this problem on google, read posts in
this newsgroup and I still haven't found anything that could help me.

Here's the scenario.

1. User accesses pageA.html
2. User clicks on menu link to open popup.html
3. pageA.html checks if popup.html is already open. It is not, open
popup.html.
4. User switches back to pageA.html (does not close popup.html)
5. User clicks menu link for pageB.html.
6. System displays pageB.html
7. User clicks menu to open popup.html
8. pageB.html checks if popup.html is already open. If it is, focus is
made on popup.html. If it isn't, popup.html is opened.

Anyone can help?

Much appreciated,
Anthony.

May 14 '06 #1
7 3635
Bump - anyone can help? I'm still stranded.

May 18 '06 #2
an**************@gmail.com wrote:
Bump - anyone can help? I'm still stranded.

With what? Please quote the context you are replying to. See
<http://cfaj.freeshell.org/google/>.

If you post the code you are having trouble with, you might get some help.

--
Ian Collins.
May 18 '06 #3
Ian Collins wrote:
an**************@gmail.com wrote:
Bump - anyone can help? I'm still stranded.

With what? Please quote the context you are replying to. See
<http://cfaj.freeshell.org/google/>.

If you post the code you are having trouble with, you might get some help.

--
Ian Collins.

Sorry for the newbiness. :)

Here was my original query.
-----

Hi,
I've looked for a solution to this problem on google, read posts in
this newsgroup and I still haven't found anything that could help me.

Here's the scenario.

1. User accesses pageA.html
2. User clicks on menu link to open popup.html
3. pageA.html checks if popup.html is already open. It is not, open
popup.html.
4. User switches back to pageA.html (does not close popup.html)
5. User clicks menu link for pageB.html.
6. System displays pageB.html
7. User clicks menu to open popup.html
8. pageB.html checks if popup.html is already open. If it is, focus is
made on popup.html. If it isn't, popup.html is opened.

Anyone can help?

Much appreciated,
Anthony.

May 20 '06 #4
an**************@gmail.com said the following on 5/20/2006 1:09 PM:
Ian Collins wrote:
an**************@gmail.com wrote:
Bump - anyone can help? I'm still stranded.
With what? Please quote the context you are replying to. See
<http://cfaj.freeshell.org/google/>.

If you post the code you are having trouble with, you might get some help.

--
Ian Collins.

Sorry for the newbiness. :)

Here was my original query.
-----

Hi,
I've looked for a solution to this problem on google, read posts in
this newsgroup and I still haven't found anything that could help me.

Here's the scenario.

1. User accesses pageA.html
2. User clicks on menu link to open popup.html


User's pop up blocker doesn't allow that page to open, but okay.

But, does it get opened via target= or by window.open?
3. pageA.html checks if popup.html is already open. It is not, open
popup.html.
Use the same name in the name/target, the browser will handle the rest.
4. User switches back to pageA.html (does not close popup.html)
5. User clicks menu link for pageB.html.
6. System displays pageB.html
7. User clicks menu to open popup.html
8. pageB.html checks if popup.html is already open. If it is, focus is
made on popup.html. If it isn't, popup.html is opened.


You will run into problems trying to focus a popup and bring it to the
front. But again, you use the same name/target in the code and the
browser will handle the rest.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 21 '06 #5

Randy Webb wrote:
an**************@gmail.com said the following on 5/20/2006 1:09 PM:
Ian Collins wrote:
an**************@gmail.com wrote:
Bump - anyone can help? I'm still stranded.

With what? Please quote the context you are replying to. See
<http://cfaj.freeshell.org/google/>.

If you post the code you are having trouble with, you might get some help.

--
Ian Collins.

Sorry for the newbiness. :)

Here was my original query.
-----

Hi,
I've looked for a solution to this problem on google, read posts in
this newsgroup and I still haven't found anything that could help me.

Here's the scenario.

1. User accesses pageA.html
2. User clicks on menu link to open popup.html


User's pop up blocker doesn't allow that page to open, but okay.

But, does it get opened via target= or by window.open?


I use window.open (would I be better off with target= ?), and I thought
that a popup blocker wouldn't mind because it was user action that
brought the popup to life. Anyhow, I haven't seen a popup blocker
mind... yet. :)
3. pageA.html checks if popup.html is already open. It is not, open
popup.html.


Use the same name in the name/target, the browser will handle the rest.


If the popup is already opened and I use the same name/target, it will
refresh the popup. Let's say the content of the popup has changed since
its original creation; in that case, I don't want the popup window to
be "re-opened" over the current content. So how do I go about doing
that?
4. User switches back to pageA.html (does not close popup.html)
5. User clicks menu link for pageB.html.
6. System displays pageB.html
7. User clicks menu to open popup.html
8. pageB.html checks if popup.html is already open. If it is, focus is
made on popup.html. If it isn't, popup.html is opened.


You will run into problems trying to focus a popup and bring it to the
front. But again, you use the same name/target in the code and the
browser will handle the rest.


Likewise, given the popup is already opened, I haven't found a way to
"only" focus the window, without refreshing it/loading content inside.
My problem seems to be that as I navigated to pageB.html, I've lost the
reference on the popup.html window; more importantly, I can't find a
way to simply get that reference, without loading any content in the
popup window if it exists.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Maybe I'm missing something... thanks for taking the time!
Anthony.

May 21 '06 #6
an**************@gmail.com said the following on 5/20/2006 1:50 PM:
Randy Webb wrote:
an**************@gmail.com said the following on 5/20/2006 1:09 PM:
Ian Collins wrote:
an**************@gmail.com wrote:
> Bump - anyone can help? I'm still stranded.
>
With what? Please quote the context you are replying to. See
<http://cfaj.freeshell.org/google/>.

If you post the code you are having trouble with, you might get some help.

--
Ian Collins.

Sorry for the newbiness. :)

Here was my original query.
-----

Hi,
I've looked for a solution to this problem on google, read posts in
this newsgroup and I still haven't found anything that could help me.

Here's the scenario.

1. User accesses pageA.html
2. User clicks on menu link to open popup.html User's pop up blocker doesn't allow that page to open, but okay.

But, does it get opened via target= or by window.open?


I use window.open (would I be better off with target= ?), and I thought
that a popup blocker wouldn't mind because it was user action that
brought the popup to life. Anyhow, I haven't seen a popup blocker
mind... yet. :)


Ever seen the way that Symantec's Norton blocks popups? It redefines the
window.open call by script and injects it in the page before any other
content. It will stop a window.open call dead in it's tracks - user
initiated or not.

var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
Test that with your popup code :)
3. pageA.html checks if popup.html is already open. It is not, open
popup.html.

Use the same name in the name/target, the browser will handle the rest.


If the popup is already opened and I use the same name/target, it will
refresh the popup.


Only if it is the same page.
Let's say the content of the popup has changed since its original
creation; in that case, I don't want the popup window to be "re-opened"
over the current content. So how do I go about doing that?
The popup won't be "re-opened", it is reused.
4. User switches back to pageA.html (does not close popup.html)
5. User clicks menu link for pageB.html.
6. System displays pageB.html
7. User clicks menu to open popup.html
8. pageB.html checks if popup.html is already open. If it is, focus is
made on popup.html. If it isn't, popup.html is opened. You will run into problems trying to focus a popup and bring it to the
front. But again, you use the same name/target in the code and the
browser will handle the rest.


Likewise, given the popup is already opened, I haven't found a way to
"only" focus the window, without refreshing it/loading content inside.


You can't. Not short of closing it and reopening it and then hoping it
stays in the front.
My problem seems to be that as I navigated to pageB.html, I've lost the
reference on the popup.html window; more importantly, I can't find a
way to simply get that reference, without loading any content in the
popup window if it exists.


The second parameter to window.open is the name of that window.

window.open(URL,winName,parameters)

<a href="someURL" target="winName">Some Page</a>

Open that first popup, then click the link. See where it loads at...

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 21 '06 #7

Randy Webb wrote:
an**************@gmail.com said the following on 5/20/2006 1:50 PM:
Randy Webb wrote:
an**************@gmail.com said the following on 5/20/2006 1:09 PM:
Ian Collins wrote:
> an**************@gmail.com wrote:
>> Bump - anyone can help? I'm still stranded.
>>
> With what? Please quote the context you are replying to. See
> <http://cfaj.freeshell.org/google/>.
>
> If you post the code you are having trouble with, you might get some help.
>
> --
> Ian Collins.

Sorry for the newbiness. :)

Here was my original query.
-----

Hi,
I've looked for a solution to this problem on google, read posts in
this newsgroup and I still haven't found anything that could help me.

Here's the scenario.

1. User accesses pageA.html
2. User clicks on menu link to open popup.html
User's pop up blocker doesn't allow that page to open, but okay.

But, does it get opened via target= or by window.open?
I use window.open (would I be better off with target= ?), and I thought
that a popup blocker wouldn't mind because it was user action that
brought the popup to life. Anyhow, I haven't seen a popup blocker
mind... yet. :)


Ever seen the way that Symantec's Norton blocks popups? It redefines the
window.open call by script and injects it in the page before any other
content. It will stop a window.open call dead in it's tracks - user
initiated or not.

var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
Test that with your popup code :)
3. pageA.html checks if popup.html is already open. It is not, open
popup.html.
Use the same name in the name/target, the browser will handle the rest.


If the popup is already opened and I use the same name/target, it will
refresh the popup.


Only if it is the same page.
Let's say the content of the popup has changed since its original
creation; in that case, I don't want the popup window to be "re-opened"
over the current content. So how do I go about doing that?


The popup won't be "re-opened", it is reused.
4. User switches back to pageA.html (does not close popup.html)
5. User clicks menu link for pageB.html.
6. System displays pageB.html
7. User clicks menu to open popup.html
8. pageB.html checks if popup.html is already open. If it is, focus is
made on popup.html. If it isn't, popup.html is opened.
You will run into problems trying to focus a popup and bring it to the
front. But again, you use the same name/target in the code and the
browser will handle the rest.


Likewise, given the popup is already opened, I haven't found a way to
"only" focus the window, without refreshing it/loading content inside.


You can't. Not short of closing it and reopening it and then hoping it
stays in the front.

Baaah, there we have it. I can't. I'll have to find a way to do this in
another way...
My problem seems to be that as I navigated to pageB.html, I've lost the
reference on the popup.html window; more importantly, I can't find a
way to simply get that reference, without loading any content in the
popup window if it exists.


The second parameter to window.open is the name of that window.

window.open(URL,winName,parameters)

<a href="someURL" target="winName">Some Page</a>

Open that first popup, then click the link. See where it loads at...

Thanks a lot for your time,
Anthony.

May 21 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Willem van Isselmuden | last post by:
Hello, I've a problem I hava a page with different popup windows, when I hit a link the first one pops up and with the first open i would like to hit the second link in the parent page so the...
38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
12
by: HarveyB | last post by:
I would like to generate non-modal popup windows from ASP.Net code-behind. I have tried using Client Side scripting like "function Test(){ window.open('test.htm',_blank,...
7
by: E Michael Brandt | last post by:
I have been lurking here for some time, and now would like to ask a question of you clever coders: My JustSo PictureWindow 3 Extension for Dreamweaver has stumbled in the face of the new Opera...
23
by: Markus | last post by:
Hi, i have this problem: Sometimes, i can't reproduce, if i click on an small image on the website, the popup _AND_ an other Tab in firefox open. Here are the linkcode: <div...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
2
by: Joe Molloy | last post by:
Hi, This isn't a mission critical question but I thought I'dl throw it out there for your feedback as it's a bit curious. I have developed a shopping cart for an application I'm working on...
1
by: Sunit Joshi | last post by:
Hello All I have an aspx with a datagrid having hyperlink colns. I open a popup window like this <asp:HyperLinkColumn DataTextFormatString="Click.." DataNavigateUrlField="ID" DataTextField="ID"...
11
by: V S Rawat | last post by:
using Javascript, I am opening a web-based url in a popup window. MyWin1=Window.Open(url, "mywindow") There is a form (form1) in the url in that popup window, I need to submit that form. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.