first off js is case sensitive so use function not Function also what do you want to do with the values? prepolulate another form or what. To loop over the elements collection you would have something like:
var foo = new Array(); for(i=0;i<opener.document.forms[0].elements.length;i++){ foo[i]=opener.document.forms[0].elements[i].value; } This would give you an array foo with all the elements values. Of course if you were using netscape and dropdowns they don't have a value but otherwise you are ok. Decent js guide at: http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm ----- Original Message ----- From: "Bruce Sorge" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Sunday, November 25, 2001 9:27 PM Subject: Re: Passing arrays to a popup > I am JavaScript stupid. My knowledge is just enough to be dangerous. I > suppose that this is the wrong context? > > <script language="JavaScript" type="text/javascript"> > <!-- > Function getItems() { > opener.document.forms[0].elements > } > //--> > </script> > > What else goes in this? > ----- Original Message ----- > From: "Don Vawter" <[EMAIL PROTECTED]> > To: "CF-Talk" <[EMAIL PROTECTED]> > Sent: Sunday, November 25, 2001 10:12 PM > Subject: Re: Passing arrays to a popup > > > > in the popup window you can refer to the elements in the main window using > > js by > > opener.document.forms[0].elements > > which is a collection of all the form fields. > > > > ----- Original Message ----- > > From: "Bruce Sorge" <[EMAIL PROTECTED]> > > To: "CF-Talk" <[EMAIL PROTECTED]> > > Sent: Sunday, November 25, 2001 9:02 PM > > Subject: Passing arrays to a popup > > > > > > > I have looked in all the archives and I cannot find how I would pass an > > > array from a form to a pop-up window. Has anyone done this? > > > > > > Bruce > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists