Hi,
For those of you who have seen my previous posts, you'll know I'm a Javascript novice <G> Due to my job at the moment, I'm taking the plunge to learn at least the basics, so I can do the simpler stuff, rather than having to outsource it to programmers
I have a Perl/PHP/MySQL programming background, so appologies if my mistake it a silly one =)
Ok, now to the nitty-gritty.
I have this code;
This works fine in IE (although a little weird results - i.e I would have expected the existing HTML etc to remain, using the document.write method?)
But anyway, the major problem is this: In Firefox (latest version), it shows the select box fine - you click a number, and it shows the right value, but then it prints out the first line (foo, in thi case), and then just hangs, and hangs, and hangs :/)
Can anyone point me in the right direction?
TIA!
Andy
For those of you who have seen my previous posts, you'll know I'm a Javascript novice <G> Due to my job at the moment, I'm taking the plunge to learn at least the basics, so I can do the simpler stuff, rather than having to outsource it to programmers

Ok, now to the nitty-gritty.
I have this code;
Code:
<html>
<head>
<title>New Page 6</title>
</head>
<body>
<script>
function makeFormsFields(numberoffields) {
alert("number of fields to make: " + numberoffields );
for (i = 0; i < numberoffields; i++) {
// document.write('test ' + i + '\n');
document.write('foo ');
}
}
</script>
<form method="POST" action="#">
<p><select size="1" name="NumberOfFiles" onchange="makeFormsFields(this.value);">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
</p>
</form>
</body>
</html>
This works fine in IE (although a little weird results - i.e I would have expected the existing HTML etc to remain, using the document.write method?)
But anyway, the major problem is this: In Firefox (latest version), it shows the select box fine - you click a number, and it shows the right value, but then it prints out the first line (foo, in thi case), and then just hangs, and hangs, and hangs :/)
Can anyone point me in the right direction?

TIA!
Andy