ro_omar@yahoo.com (Omar) wrote in message news:<8b974ca4.0504051430.401f5562@posting.google. com>...[color=blue]
> Hi,
> I've been working with this without problems:
>
> function regresaValor()
> {
> var indexValor = document.forms[0].eleccion.selectedIndex;
> var valueValor =
> document.forms[0].eleccion.options[indexValor].value;
> opener.document.forms[0].valorTxt.value = valueValor;
> window.close();
> }
>
> As you can see, this JS function returns 1 value to the parent.
> However, I'm trying to return several values to the same parent's
> element (valorTxt). Something like this:
>
> function regresaValor()[/color]
[color=blue]
> {
> var indexValor0 = document.forms[0].eleccion0.selectedIndex;
> var valueValor0 =
> document.forms[0].eleccion0.options[indexValor].value;
> var indexValor1 = document.forms[0].eleccion1.selectedIndex;
> var valueValor1 =
> document.forms[0].eleccion1.options[indexValor].value;
> var indexValor2 = document.forms[0].eleccion2.selectedIndex;
> var valueValor2 =
> document.forms[0].eleccion2.options[indexValor].value;
> var total = valueValor0 + ";" + valueValor1 + ";" valueValor2;
> opener.document.forms[0].valorTxt.value = total;
> window.close();
> }
>
> This should return a String value to the parent, where I can do
> further analysis.
>
> Is this approach the best? Can it be done? Thank you for your time and
> advices.
>
> - Omar.[/color]
i don't know exactly but what value is the function returning ???
try using ',' instead of ';' maybe that will help.