flare1028us
11-09-2003, 04:35 AM
Hey,
I am about to kill myself trying to figure this script out.
How do I make it where if i press a button on a page,
it will insert text into a text area?
:confused: :confused: :confused: :confused: :confused: :confused:
Here are a few things i have tried in the past but did not worK:
This one is where I tried to insert a copyright logo into the textarea named "zone"
<html>
<head>
<script language="javascript">
function="copyright()"
document.zone.area.value =
document.zone.area.value "©";
</script>
</head>
<body>
<textarea name="zone" rows=7 cols=46></textarea>
<input type="button" value="Copyright" onclick="copyright()"> 
</body>
</html>
This one is where i tried to make a new object form the tutorial on javascriptkit.com. Im trying to insert the text "hello" into the textarea named "zone".
<html>
<head>
<script>
function userobject(){
}
//myobject is now an object of type userobject!
var myobject=new userobject("hello")
</script>
</head>
<body>
<textarea name="zone" rows=7 cols=46></textarea>
<input type="button" value="Hello" onclick="myobject()">
</body>
</html>
Please help me out with this script. I have spent hours and hours
attemting to get this right. I know its simple, but I dont have too much Javascript experience, I like to stick with HTML.
Any response would be appreciated.
Carl
I am about to kill myself trying to figure this script out.
How do I make it where if i press a button on a page,
it will insert text into a text area?
:confused: :confused: :confused: :confused: :confused: :confused:
Here are a few things i have tried in the past but did not worK:
This one is where I tried to insert a copyright logo into the textarea named "zone"
<html>
<head>
<script language="javascript">
function="copyright()"
document.zone.area.value =
document.zone.area.value "©";
</script>
</head>
<body>
<textarea name="zone" rows=7 cols=46></textarea>
<input type="button" value="Copyright" onclick="copyright()"> 
</body>
</html>
This one is where i tried to make a new object form the tutorial on javascriptkit.com. Im trying to insert the text "hello" into the textarea named "zone".
<html>
<head>
<script>
function userobject(){
}
//myobject is now an object of type userobject!
var myobject=new userobject("hello")
</script>
</head>
<body>
<textarea name="zone" rows=7 cols=46></textarea>
<input type="button" value="Hello" onclick="myobject()">
</body>
</html>
Please help me out with this script. I have spent hours and hours
attemting to get this right. I know its simple, but I dont have too much Javascript experience, I like to stick with HTML.
Any response would be appreciated.
Carl