Web Analytics Made Easy -
StatCounter Selecting Div content - CodingForum

Announcement

Collapse
No announcement yet.

Selecting Div content

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

    Comment


    • #3
      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

      Comment

      Working...
      X