so my problem is that I want to find a way of using canvas tags that are created at runtime.
I went about this by trying to change the id of the tag, ONLY to find out that javascript
did not like the fact that I was using numbers, even though I converted to String first...
var count = 0;
for (var item=0; item<20; item ++) {
if (count%5==0){
document.write(" ||| ");
}
var canv = document.createElement("canvas");
canv.setAttribute('width',300);
canv.setAttribute('height',300);
num = 505;
aStr = num.toString(); // does NOT do the job for some reason !!!???
aStr = 'canvas'; // this works...
canv.setAttribute('id',aStr);
document.body.appendChild(canv);
count += 1;
}
var C = document.getElementById(canv.getAttribute('id'));
if (C.getContext) {
makePlot(C); // does the plot to the canvas
}