<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2722" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff size=2>Actually - everything works now except ADDING an option to
the select box (on the parent page)...the following fails:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff
size=2>window.opener.document.form1.mylist.options[window.opener.document.form1.mylist.length]
= new Option('yourText', 'yourValue');</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff size=2>So does this:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff size=2>var opt = new Option('text', 'value');<BR>var sel =
window.opener.document.form1.mylist;<BR>sel.options[sel.options.length] =
opt;<BR>window.opener.document.form1.mylist.options[window.opener.document.form1.mylist.options.length]
= opt;</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff size=2>Both give a "Server threw an exception"
error...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=181033816-20092005><FONT face=Arial
color=#0000ff size=2>Any ideas?</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=181033816-20092005><FONT face=Arial color=#0000ff
size=2>Perhaps you cannot add an item to a select box on a parent
window?</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> javascript-bounces@LaTech.edu
[mailto:javascript-bounces@LaTech.edu] <B>On Behalf Of </B>David
Stoltz<BR><B>Sent:</B> Tuesday, September 20, 2005 8:04 AM<BR><B>To:</B>
[JavaScript List]<BR><B>Subject:</B> RE: [Javascript] Controling a SELECT from a
child window<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=180090312-20092005><FONT face=Arial
color=#0000ff size=2>I get an error that says "<FONT face="Times New Roman"
color=#000000 size=3>window.opener.document.form1.mylist.option" is null or is
not an object</FONT></FONT></SPAN></DIV>
<DIV> </DIV>
<DIV align=left>
<DIV align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> javascript-bounces@LaTech.edu
[mailto:javascript-bounces@LaTech.edu] <B>On Behalf Of </B>Peter
Brunone<BR><B>Sent:</B> Monday, September 19, 2005 2:24 PM<BR><B>To:</B>
javascript@LaTech.edu<BR><B>Subject:</B> re: [Javascript] Controling a SELECT
from a child window<BR></FONT><BR></DIV></DIV>
<DIV></DIV><FONT face=arial size=2>Hi David,<BR><BR> You should
be able to use the same syntax, as long as you refer to it through the
window.opener object...<BR><BR> When someone tells me "it
doesn't work", I automatically ask what is really going on. Are you seeing
an error message -- and if so, what does it say -- or is something unexpected
happening, or is nothing at all
happening?<BR><BR>Cheers,<BR><BR>Peter<BR><BR></FONT><FONT
face="Tahoma, Arial, Sans-Serif" size=2><B>From</B>: "David Stoltz" <A
href="mailto:Dstoltz@SHH.ORG">Dstoltz@SHH.ORG</A><BR></FONT><BR>Hi All,<BR><BR>I
have a problem - I am popping up a child window, and I need to:<BR><BR>1) Clear
a select box on the parent of all it's options<BR>2) Add new options to the
select box on the parent window<BR>3) Select (highlight) an option in the select
box on the parent window<BR><BR>Can anyone give me any code how I can do this
from the CHILD window? I<BR>am trying with this so far to select an option, with
no
luck:<BR><BR>window.opener.document.form1.mylist.option[0].selected=true;<BR><BR>Thanks
for any help <SPAN> </SPAN> <SPAN> </SPAN></BODY></HTML>