Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #17565

count table rows

Newsgroups comp.lang.javascript
Date 2012-12-07 10:27 -0800
Message-ID <2fa3ab54-c5d2-492a-8c95-9ee10fa6a611@googlegroups.com> (permalink)
Subject count table rows
From jr <jlrough@yahoo.com>

Show all headers | View raw


I don't get any errors but I don't get the count of table rows either.  I don't get the todocount output to the console.
tnx,
<!DOCTYPE html>
<head>
	<meta charset="utf-8" />
		<title>To-Dos</title> 
</head>
<body>

<table id="table">
<tr>
<td> this</td> <td> is</td> <td> a test</td>
</tr>
<td>of</td><td> counting<td>table</td><td>rows</td>
</tr>


<script type="text/javascript"
window.addEventListener("load", 
function(){
	
		var todocount = document.getElementById('table').rows.length;
		console.log(todocount);
	    mydiv = document.getElementById("todocount");
		    mydiv.innerHTML = todocount;},false);
		</body>
</script>
 <div id="todocount"></div>
</body>
</html>

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

count table rows jr <jlrough@yahoo.com> - 2012-12-07 10:27 -0800
  Re: count table rows Stefan Weiss <krewecherl@gmail.com> - 2012-12-07 19:48 +0100
  Re: count table rows "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-12-07 20:56 +0200
  Re: count table rows jr <jlrough@yahoo.com> - 2012-12-07 11:23 -0800
    Re: count table rows "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-12-07 21:38 +0200
      Re: count table rows jr <jlrough@yahoo.com> - 2012-12-07 13:10 -0800
    Re: count table rows Christoph Becker <cmbecker69@gmx.de> - 2012-12-07 21:44 +0100
      Re: count table rows jr <jlrough@yahoo.com> - 2012-12-07 12:57 -0800
        Re: count table rows jr <jlrough@yahoo.com> - 2012-12-07 13:08 -0800
        Re: count table rows Christoph Becker <cmbecker69@gmx.de> - 2012-12-07 22:56 +0100
          Re: count table rows JRough <janis.rough@gmail.com> - 2012-12-07 16:28 -0800
            Re: count table rows Christoph Becker <cmbecker69@gmx.de> - 2012-12-08 03:12 +0100
  Re: count table rows jr <jlrough@yahoo.com> - 2012-12-07 11:40 -0800
    Re: count table rows Luc Yen <luc@goal.tw> - 2013-01-05 16:20 -0800
  Re: count table rows Dr J R Stockton <reply1249@merlyn.demon.co.uk.invalid> - 2012-12-09 16:37 +0000
  Re: count table rows Matt McDonald <matt@fortybelow.ca> - 2012-12-13 11:41 -0500

csiph-web