JavaScript and client side scripting.
Moderator: General Moderators
-
tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
Post
by tecktalkcm0391 »
This is what I have so far, I want it do add the contents in the clipboard to the textbox
Code: Select all
var txtarea = document.forms['xxx'].elements['message'];
var selLength = txtarea.textLength;
var selStart = txtarea.selectionStart;
var selEnd = txtarea.selectionEnd;
var s1 = (txtarea.value).substring(0,selStart);
var s2 = (txtarea.value).substring(selStart, selEnd)
var s3 = (txtarea.value).substring(selEnd, selLength);
var clipvalue = execCommand("Paste");
txtarea.value = s1 + clipvalue + s3;
txtarea.selectionStart = s1.length;
txtarea.selectionEnd = s1.length + 5 + s2.length + v.length * 2;
But it does work! Help!!!!
-
tecktalkcm0391
- DevNet Resident
- Posts: 1030
- Joined: Fri May 26, 2006 9:25 am
- Location: Florida
Post
by tecktalkcm0391 »
Can anyone just tell me what to search for cause I've already done searches for:
- add to textbox javascript
append to textbox javascript
and a few other things i don't remember
If someone could point me in the right direction it would be awsome! I'll do the research this time...
pickle
-
feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Post
by feyd »