473,396 Members | 2,018 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,396 software developers and data experts.

Differentiating a normal window from a popup window.

Hi all,

Is there any way from which we can find out if a window is opened as a modal
window or as a normal window?

I have a screen which opens as a normal window in one case and in other case
it opens as a modal window.
I want to differentiate these two conditions.

TIA.
Nov 19 '05 #1
3 1087
On the client, you can use JavaScript to check the "opener" property of the
window. A window spawned by another window has an "opener" that is a window.
If it was not spawned by another window, the 'Opener" will be null.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Suma" <Su**@discussions.microsoft.com> wrote in message
news:0C**********************************@microsof t.com...
Hi all,

Is there any way from which we can find out if a window is opened as a
modal
window or as a normal window?

I have a screen which opens as a normal window in one case and in other
case
it opens as a modal window.
I want to differentiate these two conditions.

TIA.

Nov 19 '05 #2
Try using window dialogArguments property. It applies only to windows
created by showModalDialog and showModelessDialog methods. When you open the
page in a modal window, pass something in this parameter. Otherwise leave it
null.

Wouldn't be surprised to see better solutions.

Eliyahu

"Suma" <Su**@discussions.microsoft.com> wrote in message
news:0C**********************************@microsof t.com...
Hi all,

Is there any way from which we can find out if a window is opened as a modal window or as a normal window?

I have a screen which opens as a normal window in one case and in other case it opens as a modal window.
I want to differentiate these two conditions.

TIA.

Nov 19 '05 #3
I always get it as "Undefined" :(

"Kevin Spencer" wrote:
On the client, you can use JavaScript to check the "opener" property of the
window. A window spawned by another window has an "opener" that is a window.
If it was not spawned by another window, the 'Opener" will be null.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.

"Suma" <Su**@discussions.microsoft.com> wrote in message
news:0C**********************************@microsof t.com...
Hi all,

Is there any way from which we can find out if a window is opened as a
modal
window or as a normal window?

I have a screen which opens as a normal window in one case and in other
case
it opens as a modal window.
I want to differentiate these two conditions.

TIA.


Nov 19 '05 #4

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

Similar topics

1
by: Noozer | last post by:
When using the WebBrowser control, is it possible to cause popup windows to appear within the WebBrowser control itself instead of a new window? This is what I've written in the NewWindow2 event,...
10
by: Scott | last post by:
I'm new to ASP, but I've been programming in VB for several years, and I'm having a few issues with this ASP enhancement I'm working on. I've found ASP to be a lot different than what I'm use to...
2
by: venkatesh | last post by:
Hi Members, I have used the below mentioned code to open a html page in a new browser. The window size is 200 x 300. In that browser, I've given code to open another browser of the same size....
3
by: Shiperton Henethe | last post by:
Hi Can anyone tell me how to open up a new normal, full-sized browser window from a small popup window? I'm using something like this. <script language="javascript"> <!--
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
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...
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: Marco Antonio Montalvo Durán | last post by:
hi for example, I have a page 'register.aspx' and open a second page 'popup.aspx', what I want to do is to pass the control and values obtained in 'popup.aspx' to 'register.aspx', somebody...
7
by: anthony.turcotte | last post by:
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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,...
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...
0
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...
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...

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.