Automatic copying to clipboard with javascript?

Joel Hammer Joel
Mon May 17 11:37:17 PDT 2004


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.


More information about the Linux-users mailing list