Odd Netscape: Sound steals focus.

R

Robert Dickow

Here's an interesting problem:

When Netscape Nav plays an embedded sound, the current window will
lose focus. Specifically, a user may be typing into a text
input field, but an embedded sound in another frame (refreshed) will
cause the window to lose focus. The user can not even regain focus
by clicking in the text field; one must click first in the window,
then click in the text input field in order to continue typing.

(Internet Explorer has no such problem, BTW.)

Anyway, I am trying to kludge a workaround by having some javascript
attempt to reset the focus to the input field after the embedded
sound is played. Not luck yet making this work, I'm afraid:

var oldVal = window.parent.frames['input'].window.document.forms
['MsgForm'].elements['M'].value; // for debugging, get what may be in
there.
window.parent.frames['input'].window.document.forms
['MsgForm'].elements['M'].value = oldVal + " testing"; // type it out.
top.window.frames['input'].window.document.forms
['MsgForm'].window.focus(); // try to regain focus.
// window.top.window.frames['input'].window.document.forms
['MsgForm'].elements['M'].window.focus(); // no luck either.

Any thoughts?
 
R

Robert Dickow

Adding to my own post... It seems that the problem
is really one in NetScape in the QuickTime pluggin
that plays .wav files. It must be essentially
opening a window (even if the embed specifies
no dimensions and/or the hidden attribute.). So,
I found out that in fact my code below does 'work'
more or less on its own, but 'fails' because the
pluggin seems to disorient things a bit. Now, if
I can figure out how to get the code recover
from the pluggin....

Here's an interesting problem:

When Netscape Nav plays an embedded sound, the current window will
lose focus. Specifically, a user may be typing into a text
input field, but an embedded sound in another frame (refreshed) will
cause the window to lose focus. The user can not even regain focus
by clicking in the text field; one must click first in the window,
then click in the text input field in order to continue typing.

(Internet Explorer has no such problem, BTW.)

Anyway, I am trying to kludge a workaround by having some javascript
attempt to reset the focus to the input field after the embedded
sound is played. Not luck yet making this work, I'm afraid:

var oldVal =
window.parent.frames['input'].window.document.forms
['MsgForm'].elements['M'].value; // for debugging, get what may be in
there.
window.parent.frames['input'].window.document.forms
['MsgForm'].elements['M'].value = oldVal + " testing"; // type it out.
top.window.frames['input'].window.document.forms
['MsgForm'].window.focus(); // try to regain focus.
// window.top.window.frames['input'].window.document.forms
['MsgForm'].elements['M'].window.focus(); // no luck either.

Any thoughts?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top