I have a function that writes to a div, layer or ilayer depending upon the browser. I need the same function to write to a number of divs etc all with different names (id). I pass the div etc names to the function as a strings, how do I get that string so that I can use it as the actual name.
The code they will be used in is: (myStr is the bit that will be written)
document.ilayername.document.layername.document.write(myStr);
and
divname.innerHTML=myStr;
or any other way I can pass the div etc names as parameters.
Thanks

The code they will be used in is: (myStr is the bit that will be written)
document.ilayername.document.layername.document.write(myStr);
and
divname.innerHTML=myStr;
or any other way I can pass the div etc names as parameters.
Thanks
Comment