Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: populating textarea box


Message #1 by "jeff scott" <jeff@j...> on Wed, 15 Aug 2001 01:18:12
--- jeff scott <jeff@j...> wrote:
> I want to populate a texarea box with a "<" when I
> click a button using 
> the onClick event.
> 
> Can someone please help?
> 
> thanks,
> jeff scott

  Try this: 
<SCRIPT>
function f(s)
{
  textarea1.value = s; 
//or, if you want to append text, try
//textarea1.value += s;
}
</SCRIPT>
...
Add a button on the page and write
onclick="f('your text here')".
  I hope it will help! Good luck!


  Return to Index