[thelist] setting focus in a Frameset / Javascript

Cymbala, Greg Greg.Cymbala at Den.Galileo.com
Thu Jul 11 10:59:01 CDT 2002

The window object has a focus() method.  So, you should be able to call
main.focus().  Not sure when or where it'd be best to call it.  Perhaps in
palette.htm's BODY's onLoad event.

-----Original Message-----
From: Timothy Martens [mailto:timfm at hawaii.rr.com]
Sent: Thursday, July 11, 2002 1:49 AM
To: thelist at lists.evolt.org
Subject: [thelist] setting focus in a Frameset / Javascript

Hi Everyone,

I have a two row frameset:
<frameset rows="*,19">
  <frame src="palette.htm" name="main">
  <frame src="control.htm" name="outtie">

When the frameset loads, I need the focus() to be on "main" because there is
an onkeypress behavior attached to it. Currently the keypress behavior
doesn't work until AFTER I've clicked in that frame - which is bad. How is
this done AND in which file should the function be placed?


The information in this electronic mail message is sender's business
Confidential and may be legally privileged.  It is intended solely for the
addressee(s).  Access to this Internet electronic mail message by anyone
else is unauthorized.  If you are not the intended recipient, any
disclosure, copying, distribution or any action taken or omitted to be taken
in reliance on it is prohibited and may be unlawful.
The sender believes that this E-mail and any attachments were free of any
virus, worm, Trojan horse, and/or malicious code when sent. This message and
its attachments could have been infected during  transmission. By reading
the message and opening any attachments, the recipient accepts full
responsibility for taking protective and remedial action about viruses and
other defects. Galileo International is not liable for any loss or damage
arising in any way from this message or its attachments.

More information about the thelist mailing list