473,413 Members | 1,875 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

JavaScript : Select and Copy to clipboard

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
Nov 19 '05 #1
2 1463
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" <sh**********@community.nospam> wrote in message
news:OG**************@tk2msftngp13.phx.gbl...
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

Nov 19 '05 #2
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.)

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Sheperd | last post by:
Hey everyone, I have this browser detect script and the validator is having problems with it, im trying to validate a page for XHTML 1.0 Transitional If you have any ideas or suggestions they...
5
by: DraguVaso | last post by:
Hi, I'm looking for a way to Copy and Paste Files to the clipboard. I found a lot of articles to copy pieces of text and bitmaps etc, but nog whole files. Whay I need is like you have in...
9
by: Cerebral Believer | last post by:
Hi folks, I am having some issues using a program that protects my web pages (to a degree) using JavaScript (to print screen/disable clipboard, caching text selection etc). Below is the code...
17
by: Steve | last post by:
I'm trying to code cut, copy, and paste in vb 2005 so that when the user clicks on a toolbar button, the cut/copy/paste will work with whatever textbox the cursor is current located in (I have...
3
by: zakhirn | last post by:
Hello, I have a search function that is reading companies from a database via ASP and spitting out the results. I have various fields of each company in variables and I want to be able to create...
2
by: zakhirn | last post by:
Hello, I have a search function that is reading companies from a database via ASP and spitting out the results. I have various fields of each company in variables and I want to be able to create...
3
by: trpost | last post by:
I want to be able to select a word when I highlight over any part of the word. When I say select the word, I want it to be highlighted as if I left clicked my mouse and dragged the cursor along the...
2
by: toronto | last post by:
Seasons Greetings Everyone! I want to use JavaScript's event object to detect whether someone has pressed the 'PrintScreen' key to screenshot, via the Windows Clipboard, and to print website...
1
gchq
by: gchq | last post by:
Hi there I have some text that is displayed (if the user clicks a button) in a div within a Wizard control step - this shows fine on the screen, but I also have a button to copy the text to the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.