My HTML contains a fieldset, six text input fields formatted in a table, and a submit button. The submit button includes the attribute onClick="check()" and it's worked with simpler alerts so I know that's not the problem. Here's my JavaScript:
var $ = function (id) { return document.getElementById(id); }
function check() {
var x = $("myForm");
var y;
for (var i=1; i < x.length; i++) {
y += (x.elements[i].value + "<br />;");}
alert("values: <br />" + y)
}
When I click the submit button, I don't get any alert at all. What should I do?