Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Nov 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Theoritical question

    Im wondering whether it's possible for one to be able to single-click on an existing page & copy certain contents into the clipboard?

    Ok lets start with a simple 2 frame web document, the top frame will be hidden (containing whatever javascripts), & the second frame will be where we'll do our business.

    Suppose the content is this forum (Javascript Programming forum), specifically this thread:
    Onclick question.

    So, what Id like to do is to single-click on a table cell (name section) & copy everything in it automatically, & if possible also in the adjacent cell (message section).


    Its probabl impossible, but im just curious.

    Thanks once again

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    i'm gonna say it's not possible
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Cincinnati, OH
    Posts
    545
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If this is ie specific then yes.

    How to copy to clipboard onClick:
    http://www.htmlgoodies.com/beyond/clipboard.html

    How to Paste:
    http://www.experts-exchange.com/Deve..._20368974.html

  • #4
    New Coder
    Join Date
    Nov 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you both very much for your replies .

    However the concern isn't about whether its possible to copy text into the clipboard (that's already taken care of), it's actually whether one is able to automatically copy a piece of text (using a single mouse click) from any webpage that wasn't specifically designed to have a clipboard script in it.


    Its like this forum, if it didn't have the "quote" button there, it would always be a real hasstle manually selecting text & copying it into the clipboard. So perhaps, if it's possible, I'd like to put the forum into one of two frames, the other frame will contain the relevant copy-to-clipboard code.

    When I open this HTML document, the forum would load, & so will the clipboard code. I single-click a table or a cell or something in the forum, & it would automatically get into the clipboard, perhaps a bit edited (with UBB code added).


    Ahh well, perhaps this is a VB thing. Well thanks anyways .

  • #5
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    it's still impossible. i was taking into account the existence of IE's copy-to-clipboard functionality. however, there's no way ( that i know of ) to copy text just by clicking it. IE can create text ranges by actively selecting text, and by getting the value of the of a form-field, but it can't get arbitrary text on a page. so even though IE can copy, it can't get to the text you want to copy.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #6
    New Coder
    Join Date
    Nov 2002
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ahh, shucks heh . Well thanks anyways, appreciate it


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •