Well, whatever. Everything else works, syntax wise. However I still have one nagging problem. I wanted this program to cycle through <td> elements and scoop up everything in a "n/10" format and calculate the average mean. For some reason it's not displaying the result. I'll post what I have so far.
var button = false;
var B = document.createElement("input");
var n = 0;
var y = new Array();
var x = /([0-9]{2})\/10/g ;
var c = 0;
var tds = document.getElementsByTagName("td");
var title = document.getElementsByTagName("h2")[0];
B.setAttribute('type', 'button');
B.setAttribute('value', 'Calculate!');
B.setAttribute('onclick', 'button= true');
title.appendChild(B);
if (button = true){
for(var i = 0; i< tds.length; i++) {
var td= tds[i];
if(td.innerHTML == x)
{
parseFloat('x');
if(x.NaN = true){
i++;
c++;
}
if(x < 1){
i++;
c++;
}
if(x > 10){
i++;
c++;
}
x = y[i];
n = n + y[i];
}
//for(var z = 0; z < i; z++)
//{
//n = n + y[z];
//}
}
window.open('', 'win', 'height=300,width=300').document.write('<p>', (n/(i-c)), '</p>');
}
button = false;