Connecting Tech Pros Worldwide Forums | Help | Site Map

JavaScript : Select and Copy to clipboard

Shimon Sim
Guest
 
Posts: n/a
#1: Nov 19 '05
I need to create report that user wants to be able to copy from browser to
docs / e-mail and spreadsheet.
I was wondering is it possible to write a JavaScript that would copy part of
html to clipboard.

Thank you,
Shimon



Alvin Bruney [MVP - ASP.NET]
Guest
 
Posts: n/a
#2: Nov 19 '05

re: JavaScript : Select and Copy to clipboard


nope, script cannot access the system clipboard. You can, however, wrap the
call in an ActiveX object to get around the permissions issue.

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
"Shimon Sim" <shimonsim048@community.nospam> wrote in message
news:OGmm2rDfFHA.3944@tk2msftngp13.phx.gbl...[color=blue]
>I need to create report that user wants to be able to copy from browser to
>docs / e-mail and spreadsheet.
> I was wondering is it possible to write a JavaScript that would copy part
> of html to clipboard.
>
> Thank you,
> Shimon
>[/color]


Steven Cheng[MSFT]
Guest
 
Posts: n/a
#3: Nov 19 '05

re: JavaScript : Select and Copy to clipboard


Hi Shimon,

As Alvin has mentioned, basic clientside script can't do such things since
it 's very restricted and haven't permission to access most of the
clientside resources(such as file , registry, clipboard....). Using
ActiveX control is one approach , however it'll have security requirement
on the clientside which may make the web application somewhat tightly
coupled with clientside. How do you think of this?

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Closed Thread