472,811 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,811 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 3592
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. ...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.