D
Dag Sunde
....while MyArray.toString() returns the expected value...
I have a function that returns an array:
function getProducts( auctionID )
{
var prodCount = 0;
var prodArray = new Array()
for( i=0; i < products.length; i++ )
{
if( products[0] == auctionID )
{
prodArray[prodCount] = new Array(1);
prodArray[prodCount][0] = products[1];
prodArray[prodCount][1] = products[2];
prodCount++;
}
}
return prodArray;
}
and I use it here:
var productArray
productArray = getProducts(idxAuction);
// now, productArray should hold the array returned from
// my function above.
var numProducts = productArray.lenght;
var topInfo = document.getElementById("topInfoLayer");
topInfo.innerHTML = numProducts;
...
This prints "undefined" in my topinfo layer???
Anyone?
TIA...
--
Dag.
EMail: echo lvjnugnwewn | tr "vjenlgwu" "[email protected]"
"Anyone who cannot cope with mathematics is not fully human.
At best he is a tolerable subhuman who has learned to wear
shoes, bathe and not make messes in the house."
--Lazarus Long, "Time Enough for Love", (Robert A. Heinlein)
I have a function that returns an array:
function getProducts( auctionID )
{
var prodCount = 0;
var prodArray = new Array()
for( i=0; i < products.length; i++ )
{
if( products[0] == auctionID )
{
prodArray[prodCount] = new Array(1);
prodArray[prodCount][0] = products[1];
prodArray[prodCount][1] = products[2];
prodCount++;
}
}
return prodArray;
}
and I use it here:
var productArray
productArray = getProducts(idxAuction);
// now, productArray should hold the array returned from
// my function above.
var numProducts = productArray.lenght;
var topInfo = document.getElementById("topInfoLayer");
topInfo.innerHTML = numProducts;
...
This prints "undefined" in my topinfo layer???
Anyone?
TIA...
--
Dag.
EMail: echo lvjnugnwewn | tr "vjenlgwu" "[email protected]"
"Anyone who cannot cope with mathematics is not fully human.
At best he is a tolerable subhuman who has learned to wear
shoes, bathe and not make messes in the house."
--Lazarus Long, "Time Enough for Love", (Robert A. Heinlein)