Jump to content

[SOLVED] How i can use THAT WAY to insert my sentence


marhoons

Recommended Posts

Hello..
I want any Honey to explain to me or write some code to do this Job..

::) I want to use quick insert sentence Like:
Botton (H).. if i press botton(H) where is the pointer & insert (Hello..)

My target is great some Shortcut of sentences are used most of the time..

for i.e:
Botten(H) ===> Hello My darling
Botten(G) ===> Good Morning
Botten(S) ===> See You later

;D But don't forget we don't need cleear all text in textarea..

Thanks for all..
any one have idea to help me.. ?!
Link to comment
Share on other sites

Example: (edit[color=blue] s c r i p t[/color] without spaces)
[code]
<s c r i p t type="text/javascript">

function insert(id,text)
{
document.getElementById(id).value += ' ' + text + ' ';
}

</script>



<a href="#" onclick="insert('my_field','Hello there'); return false;">Add "Hello there" to the form</a>

<textarea id="my_field"></textarea>
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.