[Javascript] Problem adding childs to select box in another window.
Antony Paul
antonypaul24 at hotmail.com
Thu Jan 22 00:51:44 CST 2004
I forgot to specify the platform.
IE 5 with win2k sp4.
rgds
Antony Paul
----- Original Message -----
From: "Antony Paul" <antonypaul24 at hotmail.com>
To: "JavaScript" <javascript at LaTech.edu>
Sent: Thursday, January 22, 2004 12:18 PM
Subject: [Javascript] Problem adding childs to select box in another window.
> Hi all,
> I am having problem adding an element to a select box in another
window.
> It is throwing an exception saying Runtime error occurred. This is what I
am
> trying to do. In one page open a new window using this code
> function linkme(me){
> win = window.open("Noname2.html","f");
> }
>
> In second window(Noname2.html) it have a text box and a button. Clicking
> button will add the contents of text box to parent windows select box. I
> would like to get added in alphabetical order or at the top. This code is
> adding this.
> <script language="JavaScript1.2">
> function saveme(me){ // me is form.
> var target = window.opener.document.forms[0].a;
> target.options[target.options.length] = new Option(me.val.value,
> me.val.value , false,false);
> }
> </script>
>
> But this throws exception at last line. I know it is some coding mistake.
> Please help me correct this.
>
> rgds
> Antony Paul
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
More information about the Javascript
mailing list