473,385 Members | 1,873 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to Highlight a Table (to copy and paste)

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
Jul 20 '05 #1
3 2015
On Tue, 3 Feb 2004 17:52:10 +0000 (UTC), John <No******@noaddress.com>
wrote:
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.


That's because there isn't a select() method for tables.

I don't believe there is any way (at all) to do this, let alone any
standard way.

Mike

--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)
Jul 20 '05 #2
DU
Michael Winter wrote:
On Tue, 3 Feb 2004 17:52:10 +0000 (UTC), John <No******@noaddress.com>
wrote:
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.

That's because there isn't a select() method for tables.

I don't believe there is any way (at all) to do this, let alone any
standard way.

Mike


It depends on what exactly the poster want to achieve. FWIW, Mozilla
Composer can "select" and highlight any number of table cells
(contiguous or not; adjacent or not) or any number of table rows or any
number of table columns. Even the table column/row structure could be
imported or exported. There are already mecanisms in Mozilla Composer
which allow this to be done.

It has been said before (I can't find the source but I'm searching) that
an entirely W3C web standards compliant HTML document could interoperate
with a W3C web standards compliant software or applications of type
spreadsheet so that data could be imported and/or exported from one to
the other and/or converted into another format (like a spreadsheet
format). Only high degree of compliance to standards would make this
possible.

DU
Jul 20 '05 #3
DU
John wrote:
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
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: The Flyer | last post by:
Hi Sorry for posting this message to so many groups, but I was not sure which group the windows keyboard experts would be reading, so I ventured to post it to all of them. I want to map or...
3
by: Faith | last post by:
Hello. I need to take a column from Excel(unknown amount of rows) that will be selected by the user and copy those cells. Then I will need to paste those cells into the first column in a Data...
1
by: Sean Howard | last post by:
Dear All, As is my want I need to do something in Access that seems simple but cannot fathom out. I have main form with two subforms, both datasheets with an almost identical table structure....
4
by: Legendary Pansy | last post by:
I was checking out the 101 C# Samples, specifically Windows Forms - Use the Clipboard. I took a look at the code for a while, and I understand what the program is doing with the cut, copy, pasting...
3
by: Rachel Suddeth | last post by:
This may not be the right forum, but it's a problem I chiefly come across when trying to post here. When I do a copy/paste from VS, the text always looks really weird (and even if I'm in an...
2
by: Mansi | last post by:
I'm trying to automate excel from c#. One of the things I need to do is to copy/paste/insert rows in excel via c# code. I tried to do the following: 1) Select a row in excel (a12 to k12) 2)...
7
by: lgbjr | last post by:
Hello All, I¡¯m using a context menu associated with some pictureboxes to provide copy/paste functionality. Copying the image to the clipboard was easy. But pasting an image from the clipboard...
0
by: squirrelonfire | last post by:
Hi I run postgreSQL from a remote server like this SSH -X cnguyen_db@okaram.spsu.edu ....enter the password Then I run bluefish& and psql The problem I'm having is that I can't copy and paste...
8
by: jh | last post by:
I'd like to copy/paste into a listbox during runtime. I can do this for a textbox but can't figure out how to accomplish this for a listbox. Any help? Thanks.
3
by: questionit | last post by:
Some websites disable the Windows copy and paste feature to use on thier website. A text can not be copied and pasted either from using shortcuts : CTRL+C, CTRL+V or from using copy, paste option...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.