Hi,
In one of my scripts I'm having difficulties adding fromvalues to an array.
For testing purposes I made an array like this:
This way my script works.
However I want to fill in the array dynamically. So I want to create the array called mijnlotto1 from input boxes that are on my page. So I did:
where combinatie1 is the name of the form and nr1 to nr6 are the names of the input boxes. However using this method the script won't work.
The array mijnlotto1 is being used to compare to another array. So I'm guessing the format of mijnlotto1 is not correct. However I'm not sure what the right format would be.
The other array is fixed and is created like this:
Any help would be appreciated.
In one of my scripts I'm having difficulties adding fromvalues to an array.
For testing purposes I made an array like this:
Code:
var mijnlotto1 = [19,23,27,32,34,41];
However I want to fill in the array dynamically. So I want to create the array called mijnlotto1 from input boxes that are on my page. So I did:
Code:
var mijnlotto1 = new Array(); mijnlotto1[0]=document.combinatie1.nr1.value; mijnlotto1[1]=document.combinatie1.nr2.value; mijnlotto1[2]=document.combinatie1.nr3.value; mijnlotto1[3]=document.combinatie1.nr4.value; mijnlotto1[4]=document.combinatie1.nr5.value; mijnlotto1[5]=document.combinatie1.nr6.value;
The array mijnlotto1 is being used to compare to another array. So I'm guessing the format of mijnlotto1 is not correct. However I'm not sure what the right format would be.
The other array is fixed and is created like this:
Code:
lotto[0] = new lottohistory('4-2-1978', '6', '17', '30', '31', '35', '37', '15', '460171.2', '0', '0', '18', '1701', '35206', '1.24');
Comment