How to Highlight a Table (to copy and paste)

J

John

var tmpelem;
tmpelem=document.getElementById("MyTableId");
tmpelem.select();

doesnt work - any ideas how I can get around this? I only want to
highlight the table and all child nodes.

Thanks!
J
 
D

DU

John said:
var tmpelem;
tmpelem=document.getElementById("MyTableId");
tmpelem.select();

doesnt work - any ideas how I can get around this? I only want to
highlight the table and all child nodes.

Thanks!
J

select() method is used for selecting text nodes, text only. select() is
supported for textarea and input type="text" only.

Depending on what exactly you are trying to do, it could be possible to
select the content of a table and do some defined operations on the such
content (and/or structure) of the table. For now you need to explicit
and detail what is it you want to do exactly.

DU
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top