LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-29-2004, 11:31 AM   #1
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092
Blog Entries: 1

Rep: Reputation: 90
changing an HTML table with javascript


How can I change a table with javascript?

I know I can add or remove rows... and create cell in those rows. I already found information to do that... however, how can I get the TABLE object for a given table in a document?

Code:
<table name="x">
</table>
.
.
.
.
.
<script>
      function modify() {
            var table = document.x
      }
</script>
is that it?
 
Old 10-29-2004, 12:18 PM   #2
mcleodnine
Senior Member
 
Registered: May 2001
Location: Left Coast - Canada
Distribution: s l a c k w a r e
Posts: 2,731

Rep: Reputation: 45
Moved: This thread is more suitable in Programin and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 10-29-2004, 12:21 PM   #3
eantoranz
Senior Member
 
Registered: Apr 2003
Location: Costa Rica
Distribution: Kubuntu, Debian, Knoppix
Posts: 2,092

Original Poster
Blog Entries: 1

Rep: Reputation: 90
Well... it certainly is better suited here in programming. Sorry about my mistake.

By the way.... I found the solution:

Code:
<table id="x">
</table>
..
.
.
.
<script>
     function add() {
          var table = document.getElementById("x");
     }
</script>
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript / HTML <select> tag djgerbavore Programming 3 04-23-2005 10:51 AM
HTML frames javascript php problem rblampain Programming 4 04-08-2005 02:51 AM
HTML: attribute height in tag table jaakkop Programming 4 03-22-2005 07:29 AM
Html Javascript help apt Programming 3 03-20-2005 11:46 PM
html page layouts with a table acid_kewpie Programming 5 06-20-2003 05:24 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration