473,410 Members | 1,889 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,410 software developers and data experts.

Two Popups on One Click

On click of a button on one page, I would like to activate a popup2-
url. However, popup2 needs another url, popup1-url completely loaded.

That means, I have to do two popups. popup2-url after completely
loading popup1-url. Is there any way to know if popup1-url is totally
loaded.

Thanks
Jun 27 '08 #1
2 1352
SAM
sh*************@gmail.com a écrit :
On click of a button on one page, I would like to activate a popup2-
url. However, popup2 needs another url, popup1-url completely loaded.

That means, I have to do two popups. popup2-url after completely
loading popup1-url. Is there any way to know if popup1-url is totally
loaded.
I think no.

But you can have your 1st popup that opens the 2nd when it's loaded

<body onload="opener.popup2(url2);" blah >

with the 2nd popup's function in main page's JS

In fact you probably can get the mother which launches the 2nd popup.

function pop1(url1, url2) {
if(typeof pop1 == 'undefined' || pop1.closed)
pop1=window.open('','','width=300,height=300,left= 10');
pop1.onload = function(){opener.pop2(url2);};
pop1.location = url1;
pop1.focus();
}
function pop2(url) {
if(typeof pop2 == 'undefined' || pop2.closed)
pop2=window.open('','','width=300,height=300,left= 350');
pop2.location = url;
pop2.focus();
}

not tested

--
sm
Jun 27 '08 #2
sh*************@gmail.com wrote:
On click of a button on one page, I would like to activate a popup2-
url. However, popup2 needs another url, popup1-url completely loaded.

That means, I have to do two popups. popup2-url after completely
loading popup1-url. Is there any way to know if popup1-url is totally
loaded.
1. Don't.

2. This can be facilitated easily with calling window.open() (best
indirectly, with feature test) from the `onload' attribute of the
`body' element of the first popup window. However, popup blockers
are specifically designed to block such unrequested popups, and
they are built into many windowed user agents nowadays.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Jun 27 '08 #3

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

Similar topics

9
by: Eunice Santorini | last post by:
Every once in a while (especially when I visit suspect web sites :), every single window on my Microsoft Windows XP & Microsoft Windows 2000 operating systems goes haywire. All the windows...
52
by: Harlan Messinger | last post by:
Can you help me figure out what to do about popups? Sometimes we develop web applications where popups make very good sense for precisely the same reasons they make sense in traditional...
7
by: Nigel Molesworth | last post by:
I'm working on a site for a friend. I've found some image popup code that does what I want (borderless, close on exit) but for some reason I occasionally get the "popup blocked" information bar in...
3
by: Marcus Otmarsen | last post by:
During the last months I obeserved a growing number of web pages with popups inside a web page. I don't know the technique by which these in-page-windows are implemented (either Javascript or...
3
by: griffith | last post by:
I need some rather technical spidering advice, and I'm hoping that this is a good place to find it (and my apologies if this isn't). My site contains pages of images, where each image includes a...
4
by: Charleees | last post by:
GIFS not working properly in JavaScript PopUps Hi all, I have a button and when i click tha button it redirects to another page..... I have also added a java script for the button that...
4
by: dd | last post by:
I have a scenario where my popups are being blocked by IE6+ and Firefox. The problem is that although the popup is a direct result of the user clicking on the link (meaning that they WANT the...
1
by: Moe Sisko | last post by:
Using : ASP.NET 2.0, IE 7. This is a strange problem with popups not working in IE to remote sites, even though popups are allowed in IE. To reproduce, create web site with two pages,...
6
by: Peter | last post by:
I am trying to create a tooltip popup - where the popup will allow you to click on a button inside the popup Kind of like the popup on the foodnetwork website ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...
0
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...

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.