473,554 Members | 5,358 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 3072
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
7286
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...
4
7065
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...
3
2244
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...
2
14627
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
130031
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...
1
2752
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...
0
7781
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. ...
0
8017
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...
0
6121
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5421
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...
0
5140
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...
0
3543
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...
0
3531
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2003
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
0
817
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.