L
LukeK1980
is this possible to do or am I dreaming
function getsomething(){
document.write(stuffToGet("myTable","tr","id"))
}
function stuffToGet(elemId,elemArray,valueToGet){
var n, elem =
document.getElementById(elemId).getElementsByTagName(elemArray)
var Nelem = elem.length;
var rS
for (n=0;n<Nelem,n++){
rS= rS + elem[n].valueToGet;
}
return(rS)
}
I want to pass the method in a variable but it doesn't seem to work
for me keep getting and undefined value.
I get the array fine it is only the method that doesn't seem to work
Please help thanks
function getsomething(){
document.write(stuffToGet("myTable","tr","id"))
}
function stuffToGet(elemId,elemArray,valueToGet){
var n, elem =
document.getElementById(elemId).getElementsByTagName(elemArray)
var Nelem = elem.length;
var rS
for (n=0;n<Nelem,n++){
rS= rS + elem[n].valueToGet;
}
return(rS)
}
I want to pass the method in a variable but it doesn't seem to work
for me keep getting and undefined value.
I get the array fine it is only the method that doesn't seem to work
Please help thanks