Automatic copying to clipboard with javascript?
ronnie gauthier
ronnieg
Mon May 17 11:37:18 PDT 2004
It is object.createTextRange, both it and execCommand are a winIE 4+
thing AFAIK. With the execCommand be sure ti use ID and not NAME.
I like this site for DHTML help.
http://www.course.com/downloads/newperspectives/crweb2/dhtml/
This one may also help a bit for what you are doing.
http://www.htmlgoodies.com/beyond/clipboard.html
On Thu, 5 Sep 2002 23:59:18 -0400
Joel Hammer <Joel at HammersHome.com> wrote:
>I can't find any information about create.TextRange and execCommand.
>Are these javascript commands or functions defined somewhere else?
>Joel
>On Fri, Jul 19, 2002 at 12:10:25PM -0500, ronnie gauthier wrote:
>> >From my collection, dont know where it came from originaly
>> needs ie 4+
>>
>> function ClipBoard()
>> {
>> holdtext.innerText = copytext.innerText;
>> Copied = holdtext.createTextRange();
>> Copied.execCommand("Copy");
>> }
>>
>> <SPAN ID="copytext"
>STYLE="height:150;width:162;background-color:pink">> This text will be
>copied onto the clipboard when you click the button below. Try it!>
></SPAN>>
>> <TEXTAREA ID="holdtext" STYLE="display:none;">
>> </TEXTAREA>
>> <BUTTON onClick="ClipBoard();">Copy to Clipboard</BUTTON>
>>
>>
>> On Fri, 19 Jul 2002 07:30:50 -0400
>> Joel Hammer <Joel at HammersHome.com> wrote:
>>
>> I am a javascript dummy:
>>
>> Does anyone know how to make javascript copy all the contents of a
>frame> to the clipboard?
>>
>> I would like to use forms in javascript to create a text page in a
>> different frame that could be pasted into a wordprocessing document.
>I> think I can figure that out, eventually. However, it would be nice
>not> to force the user to select and copy to get the frame contents
>into> the clipboard. (Lazy users rule!!) This would have to work in a
>windows> environment, and it will be all client side javascript.
>>
>> Any insight appreciated,
>>
>> Joel
>>
>> _______________________________________________
>> Linux-users mailing list -
>http://linux-sxs.org/mailman/listinfo/linux-users>
>Subscribe/Unsubscribe info, Archives,and Digests are located at the
>above URL.> _______________________________________________
>> Linux-users mailing list -
>http://linux-sxs.org/mailman/listinfo/linux-users>
>Subscribe/Unsubscribe info, Archives,and Digests are located at the
>above URL._______________________________________________
>Linux-users mailing list
>Linux-users at linux-sxs.org
>Unsubscribe/Suspend/Etc ->
>http://www.linux-sxs.org/mailman/listinfo/linux-users
More information about the Linux-users
mailing list