Thanks Peter. You brought up a great point that I didn't consider. I
appreciate your assistance.
Best Regards,
Hugh
> The onclick event in each input is not nessesary if you don't want the
values to be inserted on the fly. You may as well put a button witch the
user must press to add the addresses to the main window. But there is mutch
to think about here: What if the user inserts the addresses, clsose the
popupwindow, and then change his mind? He opens up the popupwindow again.
Should the checkboxes that he checked last time be checked now? Then you
must build a function for this to. And so on.
But basically you understood me right. The function may look something
like:
function checkChecked(){
var form = document.youtForm;
var tempAdd = '';
for(i=0;i<form.elements.length;i++){
if(form.elements[i].checked == true){
tempAdd += form.elements[i].value + ',';
}
}
opener.document.yourForm.toInputFieldName.value = tempAdd
}
/Peter
----- Original Message -----
From: <hugh@k...>
To: "JavaScript HowTo" <javascript_howto@p...>
Sent: Tuesday, May 07, 2002 1:48 PM
Subject: [javascript_howto] Re: Passing Values from one window to another
> Thanks for your response and assistance. However, I am a little
> confused. Basically, if I understand correctly, I need to create an
> OnClick Event in each input. Then, when the boxes are checked, it should
> add the address to a string, then return it to the window.opener? Again,
> I have very little experience with Javascript, so a lot of the syntax is
> also new to me.
>
> Thanks again.
>
> > the referens to the main window are opener. For exampel:
> add onclick event in the checkboxes to a function in the popup-window.
> Check
> witch checkboxes are checked and add the value to the "To:"-field. The
> latter can look something like this:
> opener.document.yourForm.theToFieldName.value =
theCheckboxesThatWasChecked
> /Peter
>
>
>
>
>
>
> ---
>
> Improve your web design skills with these new books from Glasshaus.
>
> Usable Web Menus
> http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
> http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
> http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or
> to unsubscribe send a blank email to
>
>