I am creating a Javascript cycle, that can be put in the program instead of writing
document.entry.(a_ to z_).value=(ax to zx);
My work so far :
function param() {
var counter2 = "ax bx cx dx fx gx hx ix jx kx lx mx nx ox px qx rx sx tx ux vx wx xx yx zx";
var alph2=counter2.split(" ");
for (var i=0;i<26;i++){
counter2[i]=1;
}
var letters2 = ".a_ .b_ .c_ .d_ .e_ .f_ .g_ .h_ .i_ .j_ .k_ .l_ .m_ .n_ .o_ .p_ .q_ .r_ .s_ .t_ .u_ .v_ .w_ .x_ .y_ .z_ ";
var let2=letters2.split(" ");
var entry = document.getElementById("entry");
document.entry[let2[i]].value=alph2[i];
}
But Chrome apparently doesn't like the second to last line, saying it cannot set value of undefined
- and "entry" is a form in the HTML.
I am a Javascript beginner, so thank you very much for your patience :-)