473,573 Members | 3,023 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_fram e" ...>
</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_fra me.location = 'whatever.html' ;
frames.data_fra me.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_alloca tion
Aug 10 '06 #1
3 1651
register_alloca tion 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_fram e" ...>
</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_fra me.location = 'whatever.html' ;
frames.data_fra me.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.javas cript 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_alloca tion said the following on 8/9/2006 10:34 PM:
[snip]
>>
setFn() { ...
frames.data_fra me.location = 'whatever.html' ;
frames.data_fra me.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_alloca tion
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_alloca tion said the following on 8/9/2006 10:34 PM:
[snip]
>
setFn() { ...
frames.data_fra me.location = 'whatever.html' ;
frames.data_fra me.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_alloca tion
Aug 10 '06 #4

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

Similar topics

6
3078
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 Transitional//EN"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>JS</title> </head>
3
6808
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 other called main - scripts carries a bunch of js functions rechable via parent.scripts.functioName() - Main carries the html page that utilizes some...
1
4320
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
2187
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 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...
10
6706
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 exiting a form field, if the
5
6371
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). No problems are encountered with Microsoft IE - everything works fine. Any ideas about direction? // Opera error
2
1379
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 ReportTransition.htm referenced simply contains this (nothing else): <img src="ReportTransition.gif" /> The following is the html that does not work in...
7
2307
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 frames, where the two lower ones are within a Frameset within the master Frameset: 1111111111111111111
0
7783
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...
0
7701
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...
0
8068
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...
1
5600
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...
0
5293
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3735
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2222
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1307
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1044
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...

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.