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

Page -> Popup -> New Page (close popup, leave old page open)

I KNOW this can't be as hard as I am making it.

I have a travel client with two related websites. On the homepage of
the new site (Call it "Site A") I am building for them, there is a link
to a popup window that includes the European regions both companies
offer (Links to both site A and site B).

If they click on a region that is a "Site A" region, the popup closes,
and the homepage is changed to the region page for Site A, for the
selected region.

If they click on a region that is a "Site B" region, a new window opens
with the Site B region page, but the popup doesn't close, I am assuming
because the focus is now on the Site B page. That means if they go back
to Site A and try to get that popup again, there's a good chance it
will be hidden behind the Site A homepage. (Besides, it's just messy
leaving windows open like that.)

And example Site B link within the Site A popup would be:

<a target="newwindow" href="http://www.siteb.com/reg.asp?RID=337"
onclick="window.open("http://www.siteb.com/reg.asp?RID=337","_blank");window.close();">Salzbu rg</a>

If this link is clicked on, the Site A homepage remains open, the Site
B Region page opens in a new window, but the popup does not close.

I've tried using window.opener.location as well, but get similar
results. What stupid thing am I doing THIS time?

Thanks,

Julie

Jan 17 '06 #1
2 2619
OK, I *did* figure out that if I put this in the Site B region page
(regionlist is the name of the popup window) it will close. But then it
slows down the region page loading on Site B, and kind of "blinks". Any
better solutions out there?

regionlist=window.open('','regionlist','');
regionlist.close();

Thanks,

Julie

Jan 17 '06 #2
OK, SOLVED, thank God, for the person who is searching for this. Note
that I think this will only work if you have access to the page that
you are linking TO as well as the one that you are linking from.

The onclick was the same, other than I gave it a particular name -
don't know if this made a difference or not, but I included it in case
it did:
onclick="window.open('http://www.siteb.com/reg.asp?RID=337','sitebregion');
window.close();"

THen in the reg.asp file for siteb, I included the following Javascript
(remember, the name of my popup is regionlist):

if (window.opener=="regionlist" && !regionlist.closed)
regionlist.close();

Haven't tested this cross-browse yet, and I'm hoping to God it will
work - lol (Big site, minor page :-)

Hope this helps someone else!

Julie

Jan 18 '06 #3

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

Similar topics

4
by: Sjaakie Helderhorst | last post by:
Hi, I wrote an ASP-page which allows friends to upload a datafile which will be processed and stored in a database. Because large files take some time to process I want to open a popup 'Please...
2
by: Al Clare | last post by:
Hello, I am currently having problems with Popup windows in an application I am writing. I have a page, which opens a Popup window to a Perl Script on another server. Because of this, I cant...
7
by: Jens Peter Hansen | last post by:
Hi From my main window I open a series of popup (one close - next opens) in a mockup for a registration proces. From the last popup, I want to click a buttom, so the popup closes and the URL in...
4
by: GrantS | last post by:
I am having a problem closing a popup window opened modally. When I try to close the window (when the user hits save button and the data has been processed), the Popup window opens as a full screen...
4
by: Steve Richter | last post by:
I really miss c++ .... I have an SqlConnection object within my Web.UI.Page object. The thinking is that the connection to the database server is opened once when the page starts to do its...
1
by: gvrajkumar | last post by:
Hi Popup window is opened and after some time session has expired. After session expire, if the user tries to make any actions on the popup page the user is redirected to login.jsp page. What...
4
by: Gabriella | last post by:
Hi, I have a popup window that opens from a page on my website. This popup is a form with several fields. Upon submit button it redirects to a server side ASP page which writes all data to the...
2
by: thuythu | last post by:
Please help me.... I used and Javascript to view the data. But when i click button open a popup windows, then select data and click save button. The popup close and return the main page, but the...
1
by: sweetneel | last post by:
hi all, i am developing an asp.net Application. when i am clicking a link , it opens a pop up (login page). after successfull login , the disignated url opens in the popup window. this is a problem....
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.