Inserting a character into text field

Link : rangyinputs-jquery-src.js  to the html page. (I am not the author.)

Download link : https://github.com/timdown/rangyinputs (I don’t own this account.)

To insert, use the following command:

$(“#inputTextBox”).insertText(a, caretPosition , “collapseToEnd”);

a –> to contain the character to be inserted

caretPosition –> position at which the character has to be inserted.

collapseToEnd –> cursor to be placed at the end of inserted text

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s