Copy Functionality w/o Using Copy/Paste Buffer

Discussion in 'Javascript' started by al_johnson222@yahoo.com, Nov 28, 2006.

  1. Guest

    >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, 2006
    #1
    1. Advertising

  2. Guest

    Re: Copy Functionality w/o Using Copy/Paste Buffer

    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, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Raja
    Replies:
    12
    Views:
    24,394
    John Harrison
    Jun 21, 2004
  2. David Hirschfield

    Getting text into the copy-paste buffer...

    David Hirschfield, Sep 5, 2006, in forum: Python
    Replies:
    1
    Views:
    409
    kdart
    Sep 5, 2006
  3. Mathew Cucuzella

    using TkEntry with copy/paste

    Mathew Cucuzella, Jun 7, 2010, in forum: Ruby
    Replies:
    4
    Views:
    79
    Mathew Cucuzella
    Jun 8, 2010
  4. Ralph Shnelvar

    place string into paste buffer?

    Ralph Shnelvar, Aug 9, 2010, in forum: Ruby
    Replies:
    4
    Views:
    114
    Roger Pack
    Aug 10, 2010
  5. Jeroen Wolff

    paste buffer in X11

    Jeroen Wolff, Jan 10, 2006, in forum: Perl Misc
    Replies:
    2
    Views:
    107
Loading...

Share This Page