User:Samsmith82/common.js

var foo = document.createElement("TEXTAREA"); foo.setAttribute("id", "T1"); document.body.appendChild(foo); var foo = document.createElement("BUTTON"); document.body.appendChild(foo); var c = false var n = 0

setInterval(function{ document.write(' .');  var val = document.getElementById('T1').value;

if (val === "p") { c = false; document.write(' p'); } if (val === "chbsok") { document.write(' c'); c = true; } if (c == true) { n += 1; document.write(" eval - n: " + n + " val: " + val + " result: " + eval(val)); } }, 10000);