473,394 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Netscape, frames & setting focus

I have a frameset where I call a JavaScript function in the onLoad
method:

.... <frameset cols="..." onLoad="setFn()">
... <frame name="data_frame" ...>
</frameset>

In setFn, I am dynamically loading the contents of the 'data_frame',
which works fine. I then want to set focus to the 'data_frame':

setFn() { ...
frames.data_frame.location = 'whatever.html';
frames.data_frame.focus();
}

This seems to work OK in IE and Galeon. It doesn't seem to work at all
in Mozilla 1.2.1 (Linux), Netscape 7.1, or Netscape 8.0 (both Win98).

Am I doing something wrong? Is this a known problem? If so, is there a
work around?

thanks,
register_allocation
Aug 10 '06 #1
3 1634
register_allocation said the following on 8/9/2006 10:34 PM:
I have a frameset where I call a JavaScript function in the onLoad
method:

.... <frameset cols="..." onLoad="setFn()">
... <frame name="data_frame" ...>
</frameset>

In setFn, I am dynamically loading the contents of the 'data_frame',
which works fine. I then want to set focus to the 'data_frame':

setFn() { ...
frames.data_frame.location = 'whatever.html';
frames.data_frame.focus();
}

This seems to work OK in IE and Galeon. It doesn't seem to work at all
in Mozilla 1.2.1 (Linux), Netscape 7.1, or Netscape 8.0 (both Win98).

Am I doing something wrong? Is this a known problem? If so, is there a
work around?
The problem is not using a proper reference to the frames:

window.frames['data_frame'].focus();

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Aug 10 '06 #2
Randy Webb <Hi************@aol.comwrote in
news:qq******************************@comcast.com:
register_allocation said the following on 8/9/2006 10:34 PM:
[snip]
>>
setFn() { ...
frames.data_frame.location = 'whatever.html';
frames.data_frame.focus();
}
[snip]
>
The problem is not using a proper reference to the frames:

window.frames['data_frame'].focus();
No joy Works in Galeon, not in Mozilla :-(

register_allocation
Aug 10 '06 #3
Have you tried setting focus on an element with the frame's document?
Spurrious Umlaut wrote:
Randy Webb <Hi************@aol.comwrote in
news:qq******************************@comcast.com:
register_allocation said the following on 8/9/2006 10:34 PM:
[snip]
>
setFn() { ...
frames.data_frame.location = 'whatever.html';
frames.data_frame.focus();
}
[snip]

The problem is not using a proper reference to the frames:

window.frames['data_frame'].focus();

No joy Works in Galeon, not in Mozilla :-(

register_allocation
Aug 10 '06 #4

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

Similar topics

6
by: Ingmund Sjåstad | last post by:
Trying to make a dropdown menu. I working nice in IE6 but when I try a link in Netscape 7 nothing happens. Can anybody help me? <html> <head> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0...
3
by: Da Costa Gomez | last post by:
Hi all, I've been eluded the last couple of *days* on the onload mystery within the frame and function context. Problem is as follows: - frameset with two frames. One called scripts and the...
1
by: Christian Radermacher | last post by:
Hi, the following code has the mentioned behaviour: <html> <head> <script type="text/javascript"> function newA() { for (i=0;i<3;i++) { var a = window.frames.document.createElement("a");
1
by: Robert Dickow | last post by:
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...
10
by: CES | last post by:
All, I'm having a problem returning focus back to an input field in Netscape. The code works in IE and Opera but not in netscape6+. Basically I have a function that is called upon...
5
by: Dan Tartakovsky | last post by:
Hi, folks. Does this error below look familiar to you? I'm trying to access function in one frame from the other frame. Error is received while working with Opera or Netscape (different errors)....
2
by: Brett Robichaud | last post by:
I'm using the HTML below as a transition page. It is shown while a page that takes a long time to load is processed (report.asp). It works just fine under IE6 but not Netscape 7. The...
7
by: David Hayes | last post by:
I tried finding an answer on http://www.quirksmode.org/ without success. I am attempting a complicated Frames structure. I have made it work in IE, but not Netscape. I begin with three...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.