wk said:
document.getElementById(txtObj).value syntax fails, as txtObj is a
string at the moment.
document.getElementById(), as well as Microsoft's document.all()
indeed do expect a string as (an optional first, in document.all's
case) argument.
If you have a comma separated list of IDs, and want to get an array
of elements as a result, you might use something like:
function getElementsByIds(sCSIDList) {
var aRV = [], aIDs, i, j, o;
if (typeof sCSIDList == "string") {
aIDs = txtObj.split(/,/);
if (document.getElementByID) {
for (i=0; i<aIDs.length; i++) {
aRV
= document.getElementById(aIDs);
}
}
else if (document.all) {
// ...
}
}
return aRV;
}
ciao, dhgm