Hi all,
I'm having yet another problem with arrays. I'm trying to create an application which checks the lotterynumbers to see if I have won ;-)
What I want to do is compare two arrays with eachother. One array are the numbers of that week, the other array are my numbers which I play with.
Now browsing the around on the net I've found a script which I adapted to my needs however I can't get the value into the new array.
If I execute this code I get the 6 instances which correspond with the 6 numbers but I don't get the value. The problem is that I don't know how to get that value. If someone out there can help me, that would be appreciated.
One last remark, if you want to test the code you need to save the htm as .hta, otherwise you can't access the website to get the values out of it.
Thanks
I'm having yet another problem with arrays. I'm trying to create an application which checks the lotterynumbers to see if I have won ;-)
What I want to do is compare two arrays with eachother. One array are the numbers of that week, the other array are my numbers which I play with.
Now browsing the around on the net I've found a script which I adapted to my needs however I can't get the value into the new array.
Code:
<HTML>
<HEAD>
<SCRIPT>
function getElementsByStyleClass (className) {
var page = window.frames["lottoframe"].document.all ? window.frames["lottoframe"].document.all :
window.frames["lottoframe"].document.getElementsByTagName('td');
var nummers = new Array();
for (var i = 0; i < page.length; i++)
if (page[i].className == className)
document.form.output.value += "test" + " " + page[i].innerhtml + "\n";
}
function execute() {
getElementsByStyleClass("Numbers");
}
</SCRIPT>
</HEAD>
<BODY>
<iframe name="lottoframe" width="800" height="100" src="http://www.lotto.be/pages/show.aspx?Culture=nl&pageid=results/latest/lotto" scrolling="no" marginwidth="0" marginheight="0"></iframe>
<br>
<form name="form">
<textarea name="output" cols="40" rows="10"></textarea>
<br>
<input type="button" value="Execute" onclick="javascript:execute()">
</form>
</BODY>
</HTML>
One last remark, if you want to test the code you need to save the htm as .hta, otherwise you can't access the website to get the values out of it.
Thanks
Comment