472,139 Members | 1,894 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,139 software developers and data experts.

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 2973
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**************@TK2MSFTNGP04.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**************@TK2MSFTNGP04.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*****@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.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**************@TK2MSFTNGP04.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*****@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.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**************@TK2MSFTNGP04.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Peter Pagé | last post: by
3 posts views Thread by JohnEGee | last post: by
2 posts views Thread by Todd Cary | last post: by
1 post views Thread by liu | last post: by

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.