JavaScript

Moderators: None (Apply to moderate this forum)
Number of threads: 2061
Number of posts: 5164

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
window.blur and window.focus wierd behavior in AOL Posted by robpet on 12 Dec 2002 at 11:53 PM
I've written an Instant Messaging program for my site which works great in Netscape and IE. When a person logs into my site, the parent window spawns a small monitor window continually refreshes and polls the mysql database to detect the presence of messages for the user. I use a Javascript window.blur()to hide the monitor while the user navigates the site in the parent window. When a message is found in the database, I use window.focus() to bring the monitor window containing the message to the front. This system doesn't work in AOL because the window.blur() and window.focus() commands hide or display the entire AOL browser, not the monitor window.

Does anyone know a method of focusing and blurring popup windows spawned in AOL? I would really appreciate some help. The bottom line is that I've got to figure out a method of making my monitor window come to the top when there is a message.

Report
Re: window.blur and window.focus wierd behavior in AOL Posted by gaspard on 19 Dec 2002 at 6:32 PM
: I've written an Instant Messaging program for my site which works great in Netscape and IE. When a person logs into my site, the parent window spawns a small monitor window continually refreshes and polls the mysql database to detect the presence of messages for the user. I use a Javascript window.blur()to hide the monitor while the user navigates the site in the parent window. When a message is found in the database, I use window.focus() to bring the monitor window containing the message to the front. This system doesn't work in AOL because the window.blur() and window.focus() commands hide or display the entire AOL browser, not the monitor window.
:
: Does anyone know a method of focusing and blurring popup windows spawned in AOL? I would really appreciate some help. The bottom line is that I've got to figure out a method of making my monitor window come to the top when there is a message.
:


I've never used the AOL browser, but if you can focus() indivdual windows, you should be able to not worry about blurring, which can be problematical, as something else must focus, if the active thing is blurred...

In other words, if you can focus a window, there is no need to blur, unless the window is big, and covers up all the other stuff...

also you should expeirment with the AOL browsers focus() method...

Try focusing an object inside the window, instead of the window itself..

like if you have a text field in the window, try window.document.form.textfield.focus();

I'm just speculating tho, because I don't have the AOL browser, so I'll leave it to you and anyone that replies..

-Gaspard
Report
Re: window.blur and window.focus wierd behavior in AOL Posted by robpet on 20 Dec 2002 at 12:47 AM
: : I've written an Instant Messaging program for my site which works great in Netscape and IE. When a person logs into my site, the parent window spawns a small monitor window continually refreshes and polls the mysql database to detect the presence of messages for the user. I use a Javascript window.blur()to hide the monitor while the user navigates the site in the parent window. When a message is found in the database, I use window.focus() to bring the monitor window containing the message to the front. This system doesn't work in AOL because the window.blur() and window.focus() commands hide or display the entire AOL browser, not the monitor window.
: :
: : Does anyone know a method of focusing and blurring popup windows spawned in AOL? I would really appreciate some help. The bottom line is that I've got to figure out a method of making my monitor window come to the top when there is a message.
: :
:
:
: I've never used the AOL browser, but if you can focus() indivdual windows, you should be able to not worry about blurring, which can be problematical, as something else must focus, if the active thing is blurred...
:
: In other words, if you can focus a window, there is no need to blur, unless the window is big, and covers up all the other stuff...
:
: also you should expeirment with the AOL browsers focus() method...
:
: Try focusing an object inside the window, instead of the window itself..
:
: like if you have a text field in the window, try window.document.form.textfield.focus();
:
: I'm just speculating tho, because I don't have the AOL browser, so I'll leave it to you and anyone that replies..
:
: -Gaspard
:

I've tried the focus() method in AOL and it doesn't work for the same reason that blur() doesn't -- AOL apparently doesn't treat daughter windows like individual windows. Perhaps they're treated more like frames. Anyway, there isn't a way that I can find to focus on just an individual daughter or parent window. The focus() method seems to apply to the entire browser.

However, I haven't tried your idea of focusing on an element within a daughter window. Good thought. I'll try and report back.






 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.