<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1141" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Arial size=2>this works for what i want, 
thanks.....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>pop-up window code:</FONT></DIV>
<DIV><FONT face=Arial 
size=2>-------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;opener.#attributes.formName#.optTxt.value = 
optTxt;<BR>&nbsp;&nbsp;opener.#attributes.formName#.optVal.value = 
optVal;<BR>&nbsp;&nbsp;opener.addSelect(optTxt,optVal);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>opener window code:</FONT></DIV>
<DIV><FONT face=Arial 
size=2>------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;function addSelect(newTxt, newVal) 
{<BR>&nbsp;&nbsp;newOption = new Option(newTxt, newVal, false, 
false);<BR>&nbsp;&nbsp;document.#formName#.#elemName#.options[document.#formName#.#elemName#.length] 
= newOption;<BR>&nbsp;}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>same damn code really...&nbsp; i just moved the 
code that adds the new index to the parent page...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>thanks again....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><BR><FONT face=Arial size=2>~ Terry<BR>757 
581-5981<BR>AIM/Yahoo: lv2bounce</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>----- Original Message ----- </FONT>
<DIV><FONT face=Arial size=2>From: "Terry" &lt;</FONT><A 
href="mailto:bader@tcbader.com"><FONT face=Arial 
size=2>bader@tcbader.com</FONT></A><FONT face=Arial size=2>&gt;</FONT></DIV>
<DIV><FONT face=Arial size=2>To: "[JavaScript List]" &lt;</FONT><A 
href="mailto:javascript@LaTech.edu"><FONT face=Arial 
size=2>javascript@LaTech.edu</FONT></A><FONT face=Arial size=2>&gt;</FONT></DIV>
<DIV><FONT face=Arial size=2>Sent: Tuesday, March 25, 2003 11:16 AM</FONT></DIV>
<DIV><FONT face=Arial size=2>Subject: Re: [Javascript] adding Option to an 
opener.form.select</FONT></DIV></DIV>
<DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV><FONT face=Arial 
size=2>&gt; thanks...&nbsp; gives me some ideas...&nbsp; time to play...<BR>&gt; 
<BR>&gt; ~ Terry<BR>&gt; 757 581-5981<BR>&gt; AIM/Yahoo: lv2bounce<BR>&gt; 
<BR>&gt; <BR>&gt; ----- Original Message -----<BR>&gt; From: "David T. Lovering" 
&lt;</FONT><A href="mailto:dlovering@gazos.com"><FONT face=Arial 
size=2>dlovering@gazos.com</FONT></A><FONT face=Arial size=2>&gt;<BR>&gt; To: 
"[JavaScript List]" &lt;</FONT><A href="mailto:javascript@LaTech.edu"><FONT 
face=Arial size=2>javascript@LaTech.edu</FONT></A><FONT face=Arial 
size=2>&gt;<BR>&gt; Sent: Tuesday, March 25, 2003 11:15 AM<BR>&gt; Subject: Re: 
[Javascript] adding Option to an opener.form.select<BR>&gt; <BR>&gt; <BR>&gt; 
&gt;<BR>&gt; &gt; Well, I've used this between remotes and the parent window 
(thereby making<BR>&gt; all the inheritance Nazis jump up and down) by simply 
prefacing the<BR>&gt; directive with 'window.opener'.&nbsp; Obviously, if you 
have multiple forms<BR>&gt; you'll have to use more inventive means<BR>&gt; &gt; 
of addressing them, such as 'window.opener.document.forms["myForm2"]' or<BR>&gt; 
whatever.&nbsp; It will get even more complicated if you have multiple forms 
AND<BR>&gt; multiple frames, for you'll have to address the frame first before 
you can<BR>&gt; hook on to the form.<BR>&gt; &gt;<BR>&gt; &gt; One way to avoid 
exercising the inheritance Nazis quite so much is to<BR>&gt; create a function 
native to the remote/parent window which adds the option<BR>&gt; you need.&nbsp; 
Then you can play the 'remote' game --<BR>&gt; &gt;<BR>&gt; &gt; 
window.opener.document.forms["myForm2].addNewOption("nifty");<BR>&gt; 
&gt;<BR>&gt; &gt; where addNewOption is a function defined within the same page 
you are<BR>&gt; trying to change.&nbsp; Obviously, if you are working from the 
parent window to a<BR>&gt; child window, all you have to do is dispense with the 
'opener' directive,<BR>&gt; and use<BR>&gt; &gt;<BR>&gt; &gt; 
winID.document.forms["myForm2"].addNewOption("nifty");<BR>&gt; &gt;<BR>&gt; &gt; 
where winID is the window identifier created when the child window was<BR>&gt; 
spawned originally.<BR>&gt; &gt;<BR>&gt; &gt;&nbsp;&nbsp; Many variations are 
possible, and the pitfalls you experience will<BR>&gt; depend on the 
architecture of how your frames, forms, and child windows are<BR>&gt; 
linked.&nbsp; I won't pretend that this will solve all your problems<BR>&gt; 
straight-away, but it may give you some<BR>&gt; &gt; notions.&nbsp; If you want 
to poke me again with a more explicit architectural<BR>&gt; relationship of how 
your various bits fit together, I'll be glad to look<BR>&gt; into it.<BR>&gt; 
&gt;<BR>&gt; &gt;&nbsp;&nbsp; [Depending on how tightly meshed your code is, you 
may have to<BR>&gt; dereference to 'parent' or 'top' in order to get the various 
bits to see<BR>&gt; each other].<BR>&gt; &gt;<BR>&gt; &gt;&nbsp;&nbsp; -- Dave 
Lovering<BR>&gt; &gt;<BR>&gt; &gt; Terry wrote:<BR>&gt; &gt; &gt;<BR>&gt; &gt; 
&gt; thanks, but using the forms[x] is out of the question as other 
forms<BR>&gt; maybe<BR>&gt; &gt; &gt; added in areas previous to the this 
dynamically...&nbsp; and your example<BR>&gt; &gt; &gt; addresses a select in 
the current document and not the opener in which i<BR>&gt; am<BR>&gt; &gt; &gt; 
having the problems...<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; and as for the other 
info, i know what the function definition is for<BR>&gt; &gt; &gt; option() and 
how to develop for my audience...&nbsp; what i need is a second<BR>&gt; 
look<BR>&gt; &gt; &gt; at previous code to see if i missed something...&nbsp; or 
to see if this is a<BR>&gt; &gt; &gt; know bug/problem...<BR>&gt; &gt; 
&gt;<BR>&gt; &gt; &gt; i tried adding .options[length] to the intialization of 
the new index<BR>&gt; but<BR>&gt; &gt; &gt; that still crashed it... even 
removed the 3rd and 4th arguments in the<BR>&gt; new<BR>&gt; &gt; &gt; option() 
declaration... still the same... everything so far leads to a<BR>&gt; &gt; &gt; 
crashed browser (IE)...<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; the problem i think 
is browser based when adding options to select<BR>&gt; objects<BR>&gt; &gt; &gt; 
in the opener,&nbsp; everytime it tries to set something in the opener 
select<BR>&gt; for<BR>&gt; &gt; &gt; which an index doesnt not exist it 
crashes...&nbsp; however, when just<BR>&gt; updating a<BR>&gt; &gt; &gt; current 
index value it works fine, but that means one of my options is<BR>&gt; &gt; &gt; 
overridden....<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; so i am now working on a 
work-around....&nbsp; was hoping someone had more<BR>&gt; &gt; &gt; constructive 
data on this problem with a select in the opener...<BR>&gt; &gt; &gt;<BR>&gt; 
&gt; &gt; and as for your "ranting", i would leave that to the other lists 
to<BR>&gt; &gt; &gt; debate...<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; 
thanks....<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; ~ Terry<BR>&gt; &gt; &gt; 757 
581-5981<BR>&gt; &gt; &gt; AIM/Yahoo: lv2bounce<BR>&gt; &gt; &gt;<BR>&gt; &gt; 
&gt; ----- Original Message -----<BR>&gt; &gt; &gt; From: "David T. Lovering" 
&lt;</FONT><A href="mailto:dlovering@gazos.com"><FONT face=Arial 
size=2>dlovering@gazos.com</FONT></A><FONT face=Arial size=2>&gt;<BR>&gt; &gt; 
&gt; To: "[JavaScript List]" &lt;</FONT><A 
href="mailto:javascript@LaTech.edu"><FONT face=Arial 
size=2>javascript@LaTech.edu</FONT></A><FONT face=Arial size=2>&gt;<BR>&gt; &gt; 
&gt; Sent: Tuesday, March 25, 2003 10:34 AM<BR>&gt; &gt; &gt; Subject: Re: 
[Javascript] adding Option to an opener.form.select<BR>&gt; &gt; &gt;<BR>&gt; 
&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; Ugh!&nbsp; Cold-Fusion (even the latest 
and greatest version) is a poor<BR>&gt; &gt; &gt; substitute for good solid PHP, 
Java, and JavaScript coding.&nbsp; Its<BR>&gt; features<BR>&gt; &gt; &gt; are 
chaotic, non-orthogonal, and integrate very poorly with other<BR>&gt; 
packages,<BR>&gt; &gt; &gt; and have all sorts of inheritance<BR>&gt; &gt; &gt; 
&gt; issues which will drive you mad eventually.&nbsp; [And let us not 
forget<BR>&gt; that<BR>&gt; &gt; &gt; it is God-awful slow, has huge latency 
problems, and sucks screen and<BR>&gt; CPU<BR>&gt; &gt; &gt; resources]. The 
only people who like it are newbies who think they only<BR>&gt; have<BR>&gt; 
&gt; &gt; to learn one "language" to make<BR>&gt; &gt; &gt; &gt; everything they 
want done happen without any downsides.<BR>&gt; &gt; &gt; &gt; Enough 
ranting.<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; The method I use for 
adding to a pre-existing select widget is as<BR>&gt; &gt; &gt; follows 
--<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt;&nbsp;&nbsp; var myMenu = 
document.forms[0].mySelect;<BR>&gt; &gt; &gt; &gt;&nbsp;&nbsp; 
myMenu.options[myMenu.length] = new Option("bogus", "bogus-value");<BR>&gt; &gt; 
&gt; &gt;<BR>&gt; &gt; &gt; &gt; Obviously, you can insert the other two Option 
parameters if you wish<BR>&gt; [the<BR>&gt; &gt; &gt; third controls the default 
selection, and the fourth determines whether<BR>&gt; this<BR>&gt; &gt; &gt; item 
is selected for the moment], but I usually leave that to my 'init'<BR>&gt; &gt; 
&gt; routine to work out.<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; Although 
the DOM model certainly encourages you to believe that the<BR>&gt; &gt; &gt; 
universal constructor assignments are 100% viable, I've had problems<BR>&gt; 
with<BR>&gt; &gt; &gt; them, particularly in computing environments with diverse 
browsers,<BR>&gt; OS's,<BR>&gt; &gt; &gt; and such like.&nbsp; You are welcome 
to try<BR>&gt; &gt; &gt; &gt; them of course (and many are very useful), but be 
sure to vet them for<BR>&gt; all<BR>&gt; &gt; &gt; the platforms you expect to 
have exercising your code.<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; -- Dave 
Lovering<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; 
&gt;<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; Terry wrote:<BR>&gt; &gt; 
&gt; &gt; code<BR>&gt; &gt; &gt; &gt; 
-------------------------------------------<BR>&gt; &gt; &gt; &gt; newOption = 
new Option(optTxt, optVal, 0, 1);<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; 
&gt;<BR>&gt; 
opener.#attributes.formName#.#attributes.elem#[opener.#attributes.formName#.<BR>&gt; 
&gt; &gt; #attributes.elem#.length] = newOption;<BR>&gt; &gt; &gt; &gt;<BR>&gt; 
&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; ok, able to read values from the 
opener.form.select using the same<BR>&gt; syntax<BR>&gt; &gt; &gt; as above but 
i cannot seem to add a new option...<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; 
&gt; btw, the ## are CF variables, just assume that attributes.formName 
is<BR>&gt; the<BR>&gt; &gt; &gt; name of the form from opener and 
attributes.elem is the name of the<BR>&gt; select<BR>&gt; &gt; &gt; 
object......<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; comments??<BR>&gt; 
&gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt; &gt; ~ Terry<BR>&gt; 
&gt; &gt; &gt; 757 581-5981<BR>&gt; &gt; &gt; &gt; AIM/Yahoo: lv2bounce<BR>&gt; 
&gt; &gt; &gt; _______________________________________________<BR>&gt; &gt; &gt; 
&gt; Javascript mailing list<BR>&gt; &gt; &gt; &gt; </FONT><A 
href="mailto:Javascript@LaTech.edu"><FONT face=Arial 
size=2>Javascript@LaTech.edu</FONT></A><BR><FONT face=Arial size=2>&gt; &gt; 
&gt; &gt; </FONT><A 
href="https://lists.LaTech.edu/mailman/listinfo/javascript"><FONT face=Arial 
size=2>https://lists.LaTech.edu/mailman/listinfo/javascript</FONT></A><BR><FONT 
face=Arial size=2>&gt; &gt; &gt; &gt;<BR>&gt; &gt; &gt;<BR>&gt; &gt; &gt; 
_______________________________________________<BR>&gt; &gt; &gt; Javascript 
mailing list<BR>&gt; &gt; &gt; </FONT><A 
href="mailto:Javascript@LaTech.edu"><FONT face=Arial 
size=2>Javascript@LaTech.edu</FONT></A><BR><FONT face=Arial size=2>&gt; &gt; 
&gt; </FONT><A href="https://lists.LaTech.edu/mailman/listinfo/javascript"><FONT 
face=Arial 
size=2>https://lists.LaTech.edu/mailman/listinfo/javascript</FONT></A><BR><FONT 
face=Arial size=2>&gt; &gt; 
_______________________________________________<BR>&gt; &gt; Javascript mailing 
list<BR>&gt; &gt; </FONT><A href="mailto:Javascript@LaTech.edu"><FONT face=Arial 
size=2>Javascript@LaTech.edu</FONT></A><BR><FONT face=Arial size=2>&gt; &gt; 
</FONT><A href="https://lists.LaTech.edu/mailman/listinfo/javascript"><FONT 
face=Arial 
size=2>https://lists.LaTech.edu/mailman/listinfo/javascript</FONT></A><BR><FONT 
face=Arial size=2>&gt; &gt;<BR>&gt; <BR>&gt; <BR>&gt; 
_______________________________________________<BR>&gt; Javascript mailing 
list<BR>&gt; </FONT><A href="mailto:Javascript@LaTech.edu"><FONT face=Arial 
size=2>Javascript@LaTech.edu</FONT></A><BR><FONT face=Arial size=2>&gt; 
</FONT><A href="https://lists.LaTech.edu/mailman/listinfo/javascript"><FONT 
face=Arial 
size=2>https://lists.LaTech.edu/mailman/listinfo/javascript</FONT></A><BR><FONT 
face=Arial size=2>&gt; </FONT></BODY></HTML>