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()
{
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.