473,735 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3672
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.javas cript 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.javas cript 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,parame ters)

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

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

--
Randy
comp.lang.javas cript 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,parame ters)

<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
11582
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 second links pops up a window in the first popup. The way I have it now is working but with each link the size of the popup window should be different but that doesnt happen how can I solve that problem?
38
5083
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 out what i'm doing wrong, and so far it seems i'm doing it the right way. Here's my code...any suggestions would be appreciated. <script language="javascript"> <!-- window.open("256fx/index.htm", "", "height=400, width=600"); //-->
12
12431
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, 'height=200,width=400,status=no,toolbar=no, menubar=no,location=no resizable=no scrollable=no'); but I can't seem to invoke the client side script from within a Server Side Form. I know I can use the context with to Response.redirect or Server.transfer to return a
7
3227
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 8. Jspw3 opens a popup window (using varname=window.open(...)) but there are now two problems: 1) Opera8 interprets a top,left of 0,0 to be top left of the browser window rather than of the entire screen, unlike the other modern browsers I've...
23
6411
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 align="center">
4
22211
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 description and a class_id (stored in the value attribute of each option). The user will then select a class from the drop-down list. What I want to do is have a control in the parent browser window which can store the class_id and the...
2
6163
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 which is loosely based on the e-commerce example in the quickstarts tutorial. In the cart display I have provided functionality so that when a user clicks on a product name a popup is opened with the full product details displayed.
1
2180
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" HeaderText="Desc" DataNavigateUrlFormatString= "javascript:varwin=window.open('getDetails.aspx?ID={0}',null,'menubar=no,width=400,height=80');" /> The window opens fine, but when I close it the current frame window
11
5319
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. How do I submit that form1 from the javascript from my current window? Thanks.
0
9462
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9248
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8199
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6747
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6049
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4558
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4821
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2738
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2187
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.