JavaScript : Select and Copy to clipboard

S

Shimon Sim

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
 
A

Alvin Bruney [MVP - ASP.NET]

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
 
S

Steven Cheng[MSFT]

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.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top