...

View Full Version : Theoritical question



Woodman
02-23-2003, 07:34 AM
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:
http://www.codingforums.com/showthread.php?s=&threadid=15119

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

joh6nn
02-23-2003, 09:28 PM
i'm gonna say it's not possible

allida77
02-24-2003, 01:19 AM
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/Developer/Web/Web_Languages/Q_20368974.html

Woodman
02-24-2003, 01:42 AM
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 :).

joh6nn
02-24-2003, 06:01 AM
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.

Woodman
02-24-2003, 10:38 AM
Ahh, shucks heh :). Well thanks anyways, appreciate it :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum