Hi,
I've been working with this without problems:
function regresaValor()
{
var indexValor = document.forms[0].eleccion.selec tedIndex;
var valueValor =
document.forms[0].eleccion.optio ns[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.sele ctedIndex;
var valueValor0 =
document.forms[0].eleccion0.opti ons[indexValor].value;
var indexValor1 = document.forms[0].eleccion1.sele ctedIndex;
var valueValor1 =
document.forms[0].eleccion1.opti ons[indexValor].value;
var indexValor2 = document.forms[0].eleccion2.sele ctedIndex;
var valueValor2 =
document.forms[0].eleccion2.opti ons[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.
I've been working with this without problems:
function regresaValor()
{
var indexValor = document.forms[0].eleccion.selec tedIndex;
var valueValor =
document.forms[0].eleccion.optio ns[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.sele ctedIndex;
var valueValor0 =
document.forms[0].eleccion0.opti ons[indexValor].value;
var indexValor1 = document.forms[0].eleccion1.sele ctedIndex;
var valueValor1 =
document.forms[0].eleccion1.opti ons[indexValor].value;
var indexValor2 = document.forms[0].eleccion2.sele ctedIndex;
var valueValor2 =
document.forms[0].eleccion2.opti ons[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.
Comment