473,888 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Body onblur="window. close()"

In ASP.NET 2005 I have an onblur="window. close()" javascript event in the
<body> tag. When I click on the window's scrollbar, the window closes. The
same code works fine in ASP.NET 2003.

Any ideas?
Apr 11 '06 #1
5 3099
lindanr wrote:
In ASP.NET 2005 I have an onblur="window. close()" javascript event in the
<body> tag. When I click on the window's scrollbar, the window closes. The
same code works fine in ASP.NET 2003.

Any ideas?

What do you expect to happen and what is not occuring? Sounds like its
working in both instances.
Apr 12 '06 #2
What Ray means is that the window is not the body. The scrollbar is part of
the window.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Ray Booysen" <rj***********@ rjb.za.net> wrote in message
news:OQ******** ******@TK2MSFTN GP04.phx.gbl...
lindanr wrote:
In ASP.NET 2005 I have an onblur="window. close()" javascript event in the
<body> tag. When I click on the window's scrollbar, the window closes.
The same code works fine in ASP.NET 2003.

Any ideas?

What do you expect to happen and what is not occuring? Sounds like its
working in both instances.

Apr 12 '06 #3
Thanks for your response. Perhaps I should be more descriptive.

A link on an aspx page has an onclick event using window.open() to open a
popup aspx page that is resized and moved using javascript at onload(). The
<body> tag has the onblur="window. close()" method because I want the window
to close if the user clicks the underlying window.

The popup window contains text that may not be entirely visible to the user,
so the window.open() features include displaying the window's scrollbar. In
ASP .NET 2003, the scrollbar is functional; the user can click it and scroll
to see all text in the window. The window closes if the user clicks off the
popup window. This is how I expect/intend it to function.

However, in ASP .NET 2005 clicking the scrollbar on the popup window causes
the window to close. This is not the expected action, and not what happens in
ASP .ET 2003.

Interestingly, in ASP .NET 2005 when I use the
window.onblur=" window.close()" method the scrollbar functions but the window
does NOT close when the user clicks off the popup window. Obviously the
onblur method is not firing.

What am I missing here? Is there another way I can accomplish this other
than the javascript method that is not working the same in 2005 as it does in
2003?

Thanks for any explanation, advice or ideas.


"Kevin Spencer" wrote:
What Ray means is that the window is not the body. The scrollbar is part of
the window.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Ray Booysen" <rj***********@ rjb.za.net> wrote in message
news:OQ******** ******@TK2MSFTN GP04.phx.gbl...
lindanr wrote:
In ASP.NET 2005 I have an onblur="window. close()" javascript event in the
<body> tag. When I click on the window's scrollbar, the window closes.
The same code works fine in ASP.NET 2003.

Any ideas?

What do you expect to happen and what is not occuring? Sounds like its
working in both instances.


Apr 20 '06 #4
Regardless of what version of ASP.Net was used to create the web app, the
ASP.Net is on the server side, and on the client side it's still good ol'
HTML, CSS, and JavaScript. I don't know what is diffreent between the HTML
and JavaScript you were getting before, and the HTML and JavaScript you're
getting now, but I do know that the scrollbar of a window is not now, nor
ever has been, part of the body. Do you have a URL we can look at?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"lindanr" <li*****@discus sions.microsoft .com> wrote in message
news:F4******** *************** ***********@mic rosoft.com...
Thanks for your response. Perhaps I should be more descriptive.

A link on an aspx page has an onclick event using window.open() to open a
popup aspx page that is resized and moved using javascript at onload().
The
<body> tag has the onblur="window. close()" method because I want the
window
to close if the user clicks the underlying window.

The popup window contains text that may not be entirely visible to the
user,
so the window.open() features include displaying the window's scrollbar.
In
ASP .NET 2003, the scrollbar is functional; the user can click it and
scroll
to see all text in the window. The window closes if the user clicks off
the
popup window. This is how I expect/intend it to function.

However, in ASP .NET 2005 clicking the scrollbar on the popup window
causes
the window to close. This is not the expected action, and not what happens
in
ASP .ET 2003.

Interestingly, in ASP .NET 2005 when I use the
window.onblur=" window.close()" method the scrollbar functions but the
window
does NOT close when the user clicks off the popup window. Obviously the
onblur method is not firing.

What am I missing here? Is there another way I can accomplish this other
than the javascript method that is not working the same in 2005 as it does
in
2003?

Thanks for any explanation, advice or ideas.


"Kevin Spencer" wrote:
What Ray means is that the window is not the body. The scrollbar is part
of
the window.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Ray Booysen" <rj***********@ rjb.za.net> wrote in message
news:OQ******** ******@TK2MSFTN GP04.phx.gbl...
> lindanr wrote:
>> In ASP.NET 2005 I have an onblur="window. close()" javascript event in
>> the
>> <body> tag. When I click on the window's scrollbar, the window closes.
>> The same code works fine in ASP.NET 2003.
>>
>> Any ideas?
> What do you expect to happen and what is not occuring? Sounds like its
> working in both instances.


Apr 20 '06 #5
I pulled out the relevant code and put up 2 simple sites. They are:

http://www.rtmdesigns.net/popup03

67.33.61.27/popup05

As you'll see the scrollbar functions in the '03 version, but is
inaccessible in the '05 version. There's no code behind; all source is in the
html page.

Thanks for any analysis and conclusions you can give me.

"Kevin Spencer" wrote:
Regardless of what version of ASP.Net was used to create the web app, the
ASP.Net is on the server side, and on the client side it's still good ol'
HTML, CSS, and JavaScript. I don't know what is diffreent between the HTML
and JavaScript you were getting before, and the HTML and JavaScript you're
getting now, but I do know that the scrollbar of a window is not now, nor
ever has been, part of the body. Do you have a URL we can look at?

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.

"lindanr" <li*****@discus sions.microsoft .com> wrote in message
news:F4******** *************** ***********@mic rosoft.com...
Thanks for your response. Perhaps I should be more descriptive.

A link on an aspx page has an onclick event using window.open() to open a
popup aspx page that is resized and moved using javascript at onload().
The
<body> tag has the onblur="window. close()" method because I want the
window
to close if the user clicks the underlying window.

The popup window contains text that may not be entirely visible to the
user,
so the window.open() features include displaying the window's scrollbar.
In
ASP .NET 2003, the scrollbar is functional; the user can click it and
scroll
to see all text in the window. The window closes if the user clicks off
the
popup window. This is how I expect/intend it to function.

However, in ASP .NET 2005 clicking the scrollbar on the popup window
causes
the window to close. This is not the expected action, and not what happens
in
ASP .ET 2003.

Interestingly, in ASP .NET 2005 when I use the
window.onblur=" window.close()" method the scrollbar functions but the
window
does NOT close when the user clicks off the popup window. Obviously the
onblur method is not firing.

What am I missing here? Is there another way I can accomplish this other
than the javascript method that is not working the same in 2005 as it does
in
2003?

Thanks for any explanation, advice or ideas.


"Kevin Spencer" wrote:
What Ray means is that the window is not the body. The scrollbar is part
of
the window.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"Ray Booysen" <rj***********@ rjb.za.net> wrote in message
news:OQ******** ******@TK2MSFTN GP04.phx.gbl...
> lindanr wrote:
>> In ASP.NET 2005 I have an onblur="window. close()" javascript event in
>> the
>> <body> tag. When I click on the window's scrollbar, the window closes.
>> The same code works fine in ASP.NET 2003.
>>
>> Any ideas?
> What do you expect to happen and what is not occuring? Sounds like its
> working in both instances.


Apr 24 '06 #6

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

Similar topics

6
7339
by: rob | last post by:
Hi I'm trying to create a "roll-up" effect when a window loses focus and then "roll-down" when it regains focus. This statement works properly with every browser I can get my hands on EXCEPT WinIE6. WinIE6 says there's an error in the code, but the debugging info says the problem is on line 1 char 1, which are comments. <Body bgcolor='black' Text='#dbdbdb' onblur='window.resizeTo(150,150)'
4
7107
by: Peter Pagé | last post by:
Hi, I've got a window with a "<body onBlur="window.close()"> tag that keeps closing prematurely. It happens when the user clicks on text inside a table in the same window. Apparently IE decides that the <body> no longer has the focus if the <table> within the <body> has it. Firefox handles the page correctly as does MS 5. This may be one of those "security features" that came along with Windows XP SP2, but wherever it came from,...
3
2269
by: JohnEGee | last post by:
Hello, all, and TIA for any help you can offer. I've searched the Internet for answers and have finally come here. I've created a page (several, actually) with a link that opens a pop-up window. It's a pop-up window in the sense that it's smaller than the man page and is intended to be viewed and then closed. The problem is that if I include a link on that pop-up window HTML page, when the link is clicked the new page opens IN the...
2
14642
by: Todd Cary | last post by:
Should this close the window, or have I missed something simple? Todd <html> <head> <title>Test close</title> </head> <body> This is a test on the closing of a window<br><br>
22
130594
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the document and closes it with the following code: <body onload="window.print(); window.close();"> This works correctly (or at least the way I expect it to work under MS Internet Explorer, but it cuases Netscape to "crash"
1
2776
by: liu | last post by:
I have some thumbnails and once clicked it creates a new window. I don't want extra windows everywhere so I'd like it to auto-close when it's in the background. I've found <body onBlur="self.close()" onClick="self.close()"to do the trick, but some windows are longer than 1 page that a user need to scroll the window to see it. With the script above, it closes even when clicked. I took onClick="self.close()" out but it still does the same...
0
9961
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11180
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...
0
10778
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 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...
1
10885
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
10439
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7990
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
7148
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
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4244
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.