R
Richard Lionheart
Hi All,
The test page follows. Clicking the button brings up a message box
announcing that the browser had entered the function intended to
populate the text area. Dismissing the message box leads to the
message box being populated with a dozen lines.
At least, that's what happens with Firefox. With IE, clicking the
button does nothing. Any idea why?
Regards,
Richard
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>An "HTML 4.01 Strict" compliant document</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<script>
function GenLines(n)
{
alert("Reached 'GetLines'");
for (var i=1; i<=n; i++)
{
document.MyForm.MyTextArea.value += "Line " + i + "\n";
}
}
</script>
</head>
<body>
<form name="MyForm">
<input id="Button1" type="button" value="Click for 12 lines"
onclick="GenLines(12)" /><br />
<br />
<textarea id="MyTextArea" style="width: 571px; height:
200px"></textarea></form>
</body>
</html>
The test page follows. Clicking the button brings up a message box
announcing that the browser had entered the function intended to
populate the text area. Dismissing the message box leads to the
message box being populated with a dozen lines.
At least, that's what happens with Firefox. With IE, clicking the
button does nothing. Any idea why?
Regards,
Richard
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>An "HTML 4.01 Strict" compliant document</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<script>
function GenLines(n)
{
alert("Reached 'GetLines'");
for (var i=1; i<=n; i++)
{
document.MyForm.MyTextArea.value += "Line " + i + "\n";
}
}
</script>
</head>
<body>
<form name="MyForm">
<input id="Button1" type="button" value="Click for 12 lines"
onclick="GenLines(12)" /><br />
<br />
<textarea id="MyTextArea" style="width: 571px; height:
200px"></textarea></form>
</body>
</html>