Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-08-2004, 07:32 PM   PM User | #1
Celtboy
Regular Coder

 
Join Date: May 2002
Location: Virginia, USA
Posts: 620
Thanks: 0
Thanked 6 Times in 6 Posts
Celtboy is an unknown quantity at this point
Selecting Div content

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
Celtboy is offline   Reply With Quote
Old 02-09-2004, 08:36 AM   PM User | #2
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
Quote:
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
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Kor is offline   Reply With Quote
Old 02-09-2004, 04:29 PM   PM User | #3
Willy Duitt
Banned

 
Join Date: Sep 2003
Posts: 3,620
Thanks: 0
Thanked 0 Times in 0 Posts
Willy Duitt is an unknown quantity at this point
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 feaature to look for those posts.

.....Willy
Willy Duitt is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:18 AM.


Advertisement
Log in to turn off these ads.