...

View Full Version : Selecting Div content



Celtboy
02-08-2004, 07:32 PM
Howdy folks. I don't have time to write this on my own...

I need (cross-browser) a method (via clicking a link) that will copy all contents of a div to the clipboard.


I tired doing a mydiv.focus;mydiv.selected() but it didn't want to work...silly nested divs....

anyhew, appreciate it.

TIA
-Celt

Kor
02-09-2004, 08:36 AM
will copy all contents of a div to the clipboard


hm... As far as I know, you can not copy anything in the clipboard using whichever internet's application... Are you sure you want to copy by all means in the OS's clipboard? What is your task, anyway?

You can reference and use a DIV's content using

document.getElementById('mydiv').innerHTML

method

Willy Duitt
02-09-2004, 04:29 PM
It is the (cross-browser) requirement which the O/P will have trouble with. Several IE copy to/from the clipboard solutions have recently been posted. Try using the Search (http://www.codingforums.com/search.php?s=) feaature to look for those posts.

.....Willy



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum