S
Sandy Tipper
I have never had a textarea content change, in any browser.
On several different projects.
With javascript enabled (other stuff works.)
I have read lots, and everyone says it should work.
Can anyone tell my what's wrong with the following code?
(I was trying to create a simple demo example.
The alerts are there just to help find out where it fails.
The onClick isn't even getting executed, even though
I get it to work elsewhere.)
------ textarea.htm ---------
<html>
<head>
<script type="text/javascript">
<--
function fillit(obj) {
alert('fillit called');
var x = obj.form.bigbox;
alert('The big box had: ' + x.value);
x.value = 'Some new text';
alert('The big box should have some new text in it.');
return false;
}
//-->
</script>
</head>
<body>
<form id="myform" name="myform" action="textarea.htm" method="post">
<textarea id="bigbox" name="bigbox" rows="5" cols="25">Original
text</textarea>
<input type="submit" id="doit" name="doit" value="Change the text"
onClick="return fillit(this);">
</form>
</body>
</html>
On several different projects.
With javascript enabled (other stuff works.)
I have read lots, and everyone says it should work.
Can anyone tell my what's wrong with the following code?
(I was trying to create a simple demo example.
The alerts are there just to help find out where it fails.
The onClick isn't even getting executed, even though
I get it to work elsewhere.)
------ textarea.htm ---------
<html>
<head>
<script type="text/javascript">
<--
function fillit(obj) {
alert('fillit called');
var x = obj.form.bigbox;
alert('The big box had: ' + x.value);
x.value = 'Some new text';
alert('The big box should have some new text in it.');
return false;
}
//-->
</script>
</head>
<body>
<form id="myform" name="myform" action="textarea.htm" method="post">
<textarea id="bigbox" name="bigbox" rows="5" cols="25">Original
text</textarea>
<input type="submit" id="doit" name="doit" value="Change the text"
onClick="return fillit(this);">
</form>
</body>
</html>