You are here: Inserting text into a textarea « PHP Programming Language « IT news, forums, messages
Inserting text into a textarea

Posted by cresh on 09/04/07 14:38

Hello all,

I'm in need of some help with inserting text into a textarea. I have
this (below)which actually REPLACES all text in the text area. I just
need the text to be added to existing text there.

/begincode

<head>
<script>
function InsertText(mytext){
document.Form.message.value = mytext;
}
</script>
</head>

......

<input type="button" onclick="InsertText('This text is added.')"
value="AddText">
<textarea name="message" cols="60" rows="5"></textarea>

/endcode

This text replaces what's already in the box if I click the button.
What I want is to add the text when the button is clicked, not replace
what is already in the text area.

Thanks very much for any assistance.

DB

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация