I am trying to write a kind of brute force script in javascript! This is what I have so far:
var charset = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\
Length is spelt wrong in your for loop. It should be length not lenght.
for(int i = 0; i < charset.lenght; i++){
should be for(var i = 0; i < charset.length; i++){
Also inline event handlers like <input onClick = "bruteForce()" name="input" type="image" src="arrow.jpg" align="right" />
expect the handler to be in global scope.
So if the code you shared is enclosed in some other wrapper function, it probably won't work. Otherwise it's the first syntax error causing the second as well...