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.
Expand|Select|Wrap|Line Numbers
- <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