Hello,
I have an aspx app that executes the window.open to open a popup windows,
but is there an easy way to close the popup? (I can't find a window.close
method)
Thanks! 4 1352
Last time I needed to do this, this is how I did it. I think it should still
work.
When you pop-up your window, assign the window.open function to a variable:
var childWin;
childWin = window.open('ne wwindow.htm', 'PopUp', etc....);
Then, when you need to close it, (I'm assuming from the parent window that
opened it in the first place):
if(childWin && !childWin.close d) //make sure it is not null, and it is not
already closed.
{
childWin.close( );
}
-Darrin
"Brian Mitchell" <Ma********@hot mail.com> wrote in message
news:ev******** ******@TK2MSFTN GP09.phx.gbl... Hello,
I have an aspx app that executes the window.open to open a popup windows, but is there an easy way to close the popup? (I can't find a window.close method)
Thanks!
I'm sorry, I should have specified that there is a button in the child
window that will close it. The parent won't be doing it.
Thanks!
"Darrin J Olson" <da************ @sio.midco.net> wrote in message
news:eY******** ******@TK2MSFTN GP12.phx.gbl... Last time I needed to do this, this is how I did it. I think it should
still work.
When you pop-up your window, assign the window.open function to a
variable: var childWin; childWin = window.open('ne wwindow.htm', 'PopUp', etc....);
Then, when you need to close it, (I'm assuming from the parent window that opened it in the first place):
if(childWin && !childWin.close d) //make sure it is not null, and it is
not already closed. { childWin.close( ); }
-Darrin
"Brian Mitchell" <Ma********@hot mail.com> wrote in message news:ev******** ******@TK2MSFTN GP09.phx.gbl... Hello,
I have an aspx app that executes the window.open to open a popup
windows, but is there an easy way to close the popup? (I can't find a
window.close method)
Thanks!
Oh, sorry man. Kinda' went overboard there.
There is a window.close() method to close the window. I assumed you were
doing a child window since you had mentioned the window.close below! :-)
In your OnClick event for the button, do:
window.close();
-Darrin
"Brian Mitchell" <Ma********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. I'm sorry, I should have specified that there is a button in the child window that will close it. The parent won't be doing it.
Thanks!
"Darrin J Olson" <da************ @sio.midco.net> wrote in message news:eY******** ******@TK2MSFTN GP12.phx.gbl... Last time I needed to do this, this is how I did it. I think it should still work.
When you pop-up your window, assign the window.open function to a variable: var childWin; childWin = window.open('ne wwindow.htm', 'PopUp', etc....);
Then, when you need to close it, (I'm assuming from the parent window
that opened it in the first place):
if(childWin && !childWin.close d) //make sure it is not null, and it is not already closed. { childWin.close( ); }
-Darrin
"Brian Mitchell" <Ma********@hot mail.com> wrote in message news:ev******** ******@TK2MSFTN GP09.phx.gbl... Hello,
I have an aspx app that executes the window.open to open a popup windows, but is there an easy way to close the popup? (I can't find a window.close method)
Thanks!
Yeah, that did it. Thanks for the help!!
I didn't see a window.close method in my help so I just assumed it was't
available.
Thanks again!!
"Darrin J Olson" <da************ @sio.midco.net> wrote in message
news:eG******** ******@tk2msftn gp13.phx.gbl... Oh, sorry man. Kinda' went overboard there.
There is a window.close() method to close the window. I assumed you were doing a child window since you had mentioned the window.close below! :-)
In your OnClick event for the button, do:
window.close();
-Darrin
"Brian Mitchell" <Ma********@hot mail.com> wrote in message news:%2******** ********@TK2MSF TNGP11.phx.gbl. .. I'm sorry, I should have specified that there is a button in the child window that will close it. The parent won't be doing it.
Thanks!
"Darrin J Olson" <da************ @sio.midco.net> wrote in message news:eY******** ******@TK2MSFTN GP12.phx.gbl... Last time I needed to do this, this is how I did it. I think it should still work.
When you pop-up your window, assign the window.open function to a variable: var childWin; childWin = window.open('ne wwindow.htm', 'PopUp', etc....);
Then, when you need to close it, (I'm assuming from the parent window that opened it in the first place):
if(childWin && !childWin.close d) //make sure it is not null, and it
is not already closed. { childWin.close( ); }
-Darrin
"Brian Mitchell" <Ma********@hot mail.com> wrote in message news:ev******** ******@TK2MSFTN GP09.phx.gbl... > Hello, > > I have an aspx app that executes the window.open to open a popup windows, > but is there an easy way to close the popup? (I can't find a window.close > method) > > Thanks! > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: MJEASSOC |
last post by:
I need some help with closing a popup window. I'm making an online portfolio,
that has one base page with text and thumbnails. When a user clicks on a thumb,
a new window opens containing a larger image and a caption (each contained on a
separate htm document).
I do this with a function in the header script as follows:
var picpage=" ";
var params=" ";
|
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...
|
by: bbass |
last post by:
thanks to all that replyied to my previous post with the following code
in question:
<a href="merc.htm" target="_new_merc" onfocusout=window.close
class="left_link">
i understand that the people don't like the idea of closing the browser
window because it's annoyance to the user
|
by: deko |
last post by:
I have a pop-up form in which user-defined parameters are entered. The
parameters are entered into a subform datasheet which is bound to a table.
I need to check the product of two parameters to make sure they are valid
before updating them (or closing the popup form), so I use this code:
Private Function BadValue() As Boolean
If Me!Die * Me!Site > 32000 Or Me!Die * Me!Site < 0 Then
MsgBox "Die and/or Site out of range." & vbCrLf &...
|
by: sunilborkar |
last post by:
Hello,
I want to open the unblockable PopUp Window after closing the Internet Explorer Window and also when I go back to previous page. I know how to create the Unblockable PopUp window. Only I want to know how to call that function when I close this Internet Explorer Window and when I go back to previous Page. Please Help me.
Thanks,
Sunil
| |
by: rdemyan |
last post by:
I'm using code from the following web page to open the API Browse Folder
dialog
http://www.mvps.org/access/api/api0002.htm
It all works fine. But if the dialog box is open and the user closes Access,
the system just hangs and Access apparantly cannot close. I have to open the
Windows Task Manager and force the closing (and even that takes quite awhile).
|
by: Macbane |
last post by:
Hi,
I have a 'main' form called frmIssues which has a subform control
(named linkIssuesDrug) containing the subform sfrmLink_Issues_Drugs.
A control button on the main form opens a pop-up form which allows me
to edit the record in the subform. What I want to happen is for
subform with the new edits to be updated on the main form when I close
the popup. I'm sure this is a very small bit of code in the the 'On
close' event for the popup...
|
by: =?Utf-8?B?Vk1J?= |
last post by:
How can I close popup window automatically when I close the parent window
(the application itself)?
Thanks.
|
by: Mike Hofer |
last post by:
Okay, here's the situation: we want to be able to display ASPX pages
in an UpdatePanel. The reasons for this are performance related. The
site in development uses *lots* of modal popups from some pages, and
we don't want to load all that content until it's requested.
So, what we want to do is place an IFRAME inside an UpdatePanel and,
in the onclick event for the linkbutton or button control, set the SRC
so that the content is loaded on...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |