473,626 Members | 3,443 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Two very different window.blur() results

http://home.nycap.rr.com/foryorisonly/site.htm

The top one is very different from the bottom one. If you do not recognize the difference
scroll the images to the right. Not that the toolbar File | View is enabled for the top blured
window and disabled for the bottom.

These are the same exact windows both blured using window.blur(); How is it done?
Well to tell you the truth I'd prefer it NOT to happen. I am expecting a window.blur() to give
the bottom window. Not the top. But yes that is the behavior I am getting.

When I use window.blur() can you suggest any way so that the top one never occurs?

The code is this:

<script type="text/javascript">
window.onblur = window_onblur;
function window_onblur() {
window.blur();
}
</script>

--
George Hester
_______________ _______________ ____
Jul 23 '05 #1
4 6175
George Hester wrote:
http://home.nycap.rr.com/foryorisonly/site.htm

The top one is very different from the bottom one. If you do not recognize the difference
scroll the images to the right. Not that the toolbar File | View is enabled for the top blured
window and disabled for the bottom.

These are the same exact windows both blured using window.blur(); How is it done?
Well to tell you the truth I'd prefer it NOT to happen. I am expecting a window.blur() to give
the bottom window. Not the top. But yes that is the behavior I am getting.

When I use window.blur() can you suggest any way so that the top one never occurs?

The code is this:

<script type="text/javascript">
window.onblur = window_onblur;
function window_onblur() {
window.blur();
}
</script>


That is a very good example of what you get - unpredictable results -
when you duplicate what the browser is doing. When the window gets
blurred, it has to regain focus and then blur itself, to get back where
you were to start with.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
Jul 23 '05 #2

"Randy Webb" <Hi************ @aol.com> wrote in message news:w8******** ************@co mcast.com...
George Hester wrote:
http://home.nycap.rr.com/foryorisonly/site.htm

The top one is very different from the bottom one. If you do not recognize the difference
scroll the images to the right. Not that the toolbar File | View is enabled for the top blured
window and disabled for the bottom.

These are the same exact windows both blured using window.blur(); How is it done?
Well to tell you the truth I'd prefer it NOT to happen. I am expecting a window.blur() to give
the bottom window. Not the top. But yes that is the behavior I am getting.

When I use window.blur() can you suggest any way so that the top one never occurs?

The code is this:

<script type="text/javascript">
window.onblur = window_onblur;
function window_onblur() {
window.blur();
}
</script>


That is a very good example of what you get - unpredictable results -
when you duplicate what the browser is doing. When the window gets
blurred, it has to regain focus and then blur itself, to get back where
you were to start with.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?


Thanks Randy:
It's actually helpful this behavior in what I am doing but I don't like it. It seems to me if the Window is blurred once then when it is blurred again it should exhibit the same behavior as it did the first time it was blurred. But I am finding that not to be the case. This does happen with consistency. The file menu will enable 1 3 5 7 and the other 2 4 6 8. It's a toggle. Too bad I can't use javascript to make the toggle skip a beat???

"When the window gets blrred..." follow you there. "...it has to regain focus..." - right that's what is happening by clicking on the title bar - ".."and then blur itself" - ah so that regaining focus only to immediately blur again causes this behavior. Is this just a Microsoft Internet Explorer issue or do other browsers exhibit similar behavior using window.blur()?

--
George Hester
_______________ _______________ ____
Jul 23 '05 #3
George Hester wrote:
Thanks Randy:
It's actually helpful this behavior in what I am doing but I don't like it.
It seems to me if the Window is blurred once then when it is blurred again it
should exhibit the same behavior as it did the first time it was blurred. But
I am finding that not to be the case. This does happen with consistency. The
file menu will enable 1 3 5 7 and the other 2 4 6 8. It's a toggle. Too bad
I can't use javascript to make the toggle skip a beat???
Maybe you could double blur it. Just double the code you have now. That
should cause it - theoretically - to skip a beat.
"When the window gets blrred..." follow you there. "...it has to regain focus..."
- right that's what is happening by clicking on the title bar - ".."and then blur
itself" - ah so that regaining focus only to immediately blur again causes this
behavior. Is this just a Microsoft Internet Explorer issue or do other browsers
exhibit similar behavior using window.blur()?


I can't even get IE to duplicate that behavior. But Mozilla doesn't
display that behaovior either.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #4

"Randy Webb" <Hi************ @aol.com> wrote in message news:n_******** ************@co mcast.com...
George Hester wrote:
Thanks Randy:
It's actually helpful this behavior in what I am doing but I don't like it.
It seems to me if the Window is blurred once then when it is blurred again it
should exhibit the same behavior as it did the first time it was blurred. But
I am finding that not to be the case. This does happen with consistency. The
file menu will enable 1 3 5 7 and the other 2 4 6 8. It's a toggle. Too bad
I can't use javascript to make the toggle skip a beat???


Maybe you could double blur it. Just double the code you have now. That
should cause it - theoretically - to skip a beat.
"When the window gets blrred..." follow you there. "...it has to regain focus..."
- right that's what is happening by clicking on the title bar - ".."and then blur
itself" - ah so that regaining focus only to immediately blur again causes this
behavior. Is this just a Microsoft Internet Explorer issue or do other browsers
exhibit similar behavior using window.blur()?


I can't even get IE to duplicate that behavior. But Mozilla doesn't
display that behaovior either.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq


OK I will try to put together a working exhibition of this behavior this weekend and I'll post it back here. If you
do not have access to either IE 5 or IE 5.5 then you won't see it. It doesn't happen in IE 6. It might you just
cannot see it.

It's funny that you mention "doubling up the code" because that is in fact what I did to make this
experiemnt work in the first place. This is the best I can do and now I'm stumped. I never expected
the only shortoming in this to be a toggling file menu.

But like I said it is sort of a saving grace. Because without it I wouldn't be able to View | Refresh. And no
F5 won't do nothing. Remember it is out of focus.

--
George Hester
_______________ _______________ ____
Jul 23 '05 #5

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

Similar topics

2
4202
by: Fred Snider | last post by:
Help! Opening a new window using the window.open( ) command works great for opening new windows and having them on top and having the focus. The window.focus command brings any existing windows to the front (top) in Netscape, IE and Opera. However, this command does nothing when you access the web page through AOL, even though they say this is IE. Once a window is behind (blurred), I have been unable to bring it back to the front...
1
12523
by: amith | last post by:
Hi, I have a javascript, calendar.js which i use to enable my client to select the date. This calendar pops up on the click of a gif image. But the problem is that this poped up window is not modal in nature(i do not want the user to go the parent page unless he selects some date in the calendar popup). In the javascript calendar.js he has used window.open() function to pop up the window. i just want to know whether we have any...
1
16578
by: Barry Svee | last post by:
I'm struggling with the JavaScript blur event. I have an activex control that I need to interact with when a window loses focus, namely to instruct it to give up control of a barcode scanner so that the application being brought foreward can take control. It has been my observation that when I set the window.onblur function, the window will gain focus and then immediately lose focus (blur) to the first field, button, or whatever that is...
5
2282
by: Sean Berry | last post by:
I have a news video that I am sending out for a client. There are embedded links to flash movies in the email. I want the popup to be a set size (400 x 400). I am currently using the following code, but the popup window is not 400 x 400, it is whatever the browser size was last time it was opened. How can I set the absolute size from within this email? Thanks.
2
4807
by: jacek | last post by:
hi, I have a form and onsubmit there's a code like this <form onsubmit="w=window.open(); w.blur(); " > the window opens correctly, all the parameters work just fine, but the window doesn't get minimized. My browser is Internet Explorer 6.
2
2210
by: maxrawson | last post by:
Greetings all: I have an asp.net application that is coded mainly in vb.net. I have successfully cut and pasted some javascript into my application that mimicks the datetime picker control in vb. I wanted to try to use that same code for another popup style window that displays a list of airport codes in a datagrid. The desired results would be that when an airport code (the datagrid's key field) is clicked the value would write back...
12
6993
by: Susan Cranford | last post by:
Please forgive, I have looked at so much info I can't figure out how to put it together even though I know it must be fairly simple. I have an array of input text boxes (txtDOBn) where n is created at load. On the onchange event I want to calc the age and show in adjacent input text boxes that are readonly and also arrays (an age calced for each DOB entered). I was going to use the datediff function in vbscript to do the calc. Can...
6
3077
by: amirkarger | last post by:
I have a simple "quickbrowse" menu that does this: <form> <select name="quickbrowse" onchange="go(this)"> <option selected value="">go to a tool...</option> <option value="#tool1">Great tool #1</option> <option value="#tool2">Great tool #2</option> <option value="#tool3">Great tool #3</option> </select> </form>
4
2214
by: Spizzat2 | last post by:
I'm trying to figure out a workaround to a minor annoyance that I'm coming up with while coding a site. I've got some keyboard shortcuts set up for the site via javascript, and when I press escape, it's set to hide several divs on the page, and remove focus from a link. Unfortunately, I don't know which link will have focus, so I can't just blur a particular element (that I'm aware of) since I won't know which element it is. I got it...
0
8268
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
8202
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,...
0
8641
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
8366
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
8510
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
6125
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
4202
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1812
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1512
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.