Links

Lists

Latest Updates

Ruby On Rails List
Python list
Advanced Java
The JavaScript List
Apache Users
Full Disclosure
Linux Security

Search the archives!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Javascript] Controling a SELECT from a child window


  • From: Dstoltz at SHH.ORG (David Stoltz)
  • Subject: [Javascript] Controling a SELECT from a child window
  • Date: Tue Sep 20 08:57:18 2005

I think I got it:
 
 
It should be:
window.opener.document.form1.mylist.options[0].selected=true;

not:
window.opener.document.form1.mylist.option[0].selected=true;

The "option" should be "options"
 

________________________________

From: javascript-bounces@xxxxxxxxxx
[mailto:javascript-bounces@xxxxxxxxxx] On Behalf Of David Stoltz
Sent: Tuesday, September 20, 2005 8:04 AM
To: [JavaScript List]
Subject: RE: [Javascript] Controling a SELECT from a child window


I get an error that says "window.opener.document.form1.mylist.option" is
null or is not an object
 
________________________________

From: javascript-bounces@xxxxxxxxxx
[mailto:javascript-bounces@xxxxxxxxxx] On Behalf Of Peter Brunone
Sent: Monday, September 19, 2005 2:24 PM
To: javascript@xxxxxxxxxx
Subject: re: [Javascript] Controling a SELECT from a child window


Hi David,

   You should be able to use the same syntax, as long as you refer to it
through the window.opener object...

   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?

Cheers,

Peter

From: "David Stoltz" Dstoltz@xxxxxxx

Hi All,

I have a problem - I am popping up a child window, and I need to:

1) Clear a select box on the parent of all it's options
2) Add new options to the select box on the parent window
3) Select (highlight) an option in the select box on the parent window

Can anyone give me any code how I can do this from the CHILD window? I
am trying with this so far to select an option, with no luck:

window.opener.document.form1.mylist.option[0].selected=true;

Thanks for any help    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.LaTech.edu/pipermail/javascript/attachments/20050920/be2cb12c/attachment.html