473,473 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Copy Functionality w/o Using Copy/Paste Buffer

>From any page, I want to be able to call a JS function that will do the
equivelant of select all, and copy. This data will then be posted to a
page that will log it.

This would be easy using copy/paste functionality but I don't want to
screw-up users copy/paste buffer. Anyone have an example of how to
retrieve all text with similar formatting of copying page to notepad
without using copy/paste functionality? Thanks in advance.

Al

Nov 28 '06 #1
2 4420

There is no access to the clipboard object on the client environment, with the
sole exception of IE dataTransfer object which does allow it, so you'd have to
be a bit more specific. If you mean to have it cross by means of some shared
object daemon or such from browser, no dice, you'd still need to use the
clipboard on most if not all, and depending on the page, it may be big or not.

Danny
Nov 28 '06 #2

Danny wrote:
There is no access to the clipboard object on the client environment, with the
sole exception of IE dataTransfer object which does allow it, so you'd have to
be a bit more specific. If you mean to have it cross by means of some shared
object daemon or such from browser, no dice, you'd still need to use the
clipboard on most if not all, and depending on the page, it may be big or not.

Danny
Ok - is what I'm trying to do is simple integration with a third-party
web application. They have an 'Action' button on all pages that they
can associate with a JS function. Our application is very proficient
at parsing text provided it is in some reasonably standard structure.

Is what I am trying to do is have a JS function that can be called from
any page in their system that will provide a reasonable representation
of the data on the screen. I need something close to
document.body.innerText; the problem with this function is that it
strips spacing from tables so we can't get consistent layout.

The consistent layout I am looking for would be the same as if you did
the following on any page:
1) Select all
2) Copy
3) Paste to notepad

Is there a function or process that will retrieve all text and retain
formatting?

Dec 1 '06 #3

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

Similar topics

9
by: (Pete Cresswell) | last post by:
I see this coming on a develpment effort that may materialize shortly. These guys don't want to mess around with automated imports from text feeds BC in the past they've had too many problems...
3
by: Tor Inge Rislaa | last post by:
Copy, Cut and Paste How to code the Copy, Cut and Paste functionality in VB.NET. In VB 6.0 I used the following code: 'For Copy Clipboard.Clear Clipboard.SetText...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
5
by: kirschpe | last post by:
I developed an application using visual studio 2003. Now I want to make a similar application without having to redesign similar forms. Is there a way to copy and paste windows forms across...
6
by: Ben R. | last post by:
Hi, I've got a vb.net winforms app. Out of the box, I can use Ctrl X, C and V as expected in controls like textboxes. I've got a menustrip, and if I click the link "Add standard items" which...
1
by: David Hirschfield | last post by:
Strange request, but is there any way to get text into the linux copy-paste buffer from a python script ? I know the standard python libraries won't have that functionality (except as a...
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...
0
by: Tom | last post by:
When I use ctrl-c to copy and ctrl-v to paste from a RichTextBox into NotePad ... I get nice ASCII text with the proper returns. Everything looks good. When I paste into WordPad ... I get the...
8
by: jh | last post by:
I'd like to copy/paste into a listbox during runtime. I can do this for a textbox but can't figure out how to accomplish this for a listbox. Any help? Thanks.
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.