estesflyer
Programmer
here is a script that I was supposed to write after reading some tutorials at webmonkey, which werent that great at all! If someone could plz explain this script line by line and tell me how it works I would really be greatful!!
<script language="javascript">
<!--
var height = prompt("How high do you want the grid? (1-10 is good)","10"
var width= prompt("How wide do you want the grid? (1-10 is good)","10"
var a_line;
var new_window =
window.open("top.html","looper","width=400,height=400"
new_window.document.writeln("<h1>A Grid</h1>"
for (height_loop = 0; height_loop < height; height_loop++)
{
a_line = "";
for (width_loop = 0; width_loop < width; width_loop++)
{
a_line+="x";
}
new_window.document.writeln(a_line + "<br>"
}
//-->
Also, if you know of any sites that talk about the for and when loops, I would really be thankful for that also!!
- Rusty
<script language="javascript">
<!--
var height = prompt("How high do you want the grid? (1-10 is good)","10"
var width= prompt("How wide do you want the grid? (1-10 is good)","10"
var a_line;
var new_window =
window.open("top.html","looper","width=400,height=400"
new_window.document.writeln("<h1>A Grid</h1>"
for (height_loop = 0; height_loop < height; height_loop++)
{
a_line = "";
for (width_loop = 0; width_loop < width; width_loop++)
{
a_line+="x";
}
new_window.document.writeln(a_line + "<br>"
}
//-->
Also, if you know of any sites that talk about the for and when loops, I would really be thankful for that also!!
- Rusty