471,084 Members | 1,015 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

getElementById multiple Id's

banning
42
ok ok i've read everywhere how using multiple id's is wrong and what not so don't get all hatefully, if there is a better way let me know... here is what i got

Expand|Select|Wrap|Line Numbers
  1. var click=0;
  2.  
  3. function bgCOLOR(){
  4.     if(click==0){
  5.         click=1;
  6.     }else{
  7.         click=0;
  8.     }
  9.  
  10.     if (click==1){
  11.         document.getElementById('heha').style.backgroundColor='red';
  12.     }else{
  13.         document.getElementById('heha').style.backgroundColor='white';
  14.     }
  15. }
  16.  
  17. <table>
  18. <tr>
  19. <td id="heha'" onclick="bgCOLOR();"></td>
  20. </tr>
  21. <tr>
  22. <td id="heha'" onclick="bgCOLOR();"></td>
  23. </tr>
  24.  
ok so my noob question is why wont it change the background color on both table divisions?

im pretty entry level at javascript i primarly use just php but i figured its time to grow and start integrating the 2.

anyway thanks for the help guys in advance.
Aug 31 '07 #1
26 3985
pbmods
5,821 Expert 4TB
Heya, Banning.

Try using the name property, which does not have to be unique:
Expand|Select|Wrap|Line Numbers
  1. <td name="myName" ... >
  2. .
  3. .
  4. .
  5. <td name="myName" ... >
  6.  
Expand|Select|Wrap|Line Numbers
  1. var tds = document.getElementsByName('myName');
  2. for( var i = 0; i < tds.length; ++i )
  3. {
  4.     tds[i].style.backgroundColor = 'annoyingly bright neon peach';
  5. }
  6.  
Aug 31 '07 #2
banning
42
wow you're just like every where on these boards haha... i really love getting help from ya you explain things very well
Aug 31 '07 #3
pbmods
5,821 Expert 4TB
Heya, Banning.

We aim to please.

Good luck with your project, and if you ever need anything, post back anytime :)
Aug 31 '07 #4
markrawlingson
346 Expert 100+
If i might suggest a slightly different method...

Expand|Select|Wrap|Line Numbers
  1. function bgCOLOR(oObj,sColorOn,sColorOff) {
  2.      if (oObj.style.backgroundColor == sColorOn) {
  3.           oObj.style.backgroundColor = sColorOff;
  4.      }
  5.      else {
  6.           oObj.style.backgroundColor = sColorOn;
  7.      }
  8. }
  9.  
Expand|Select|Wrap|Line Numbers
  1. <tr>
  2. <td onClick="bgCOLOR(this,'#000000','#FF0000');">
  3.  
  4. </td>
  5. </tr>
  6.  
This way you don't need to fiddle with any ids or names for these objects because you are refering to 'this' - ie: the object that fired the event (onClick) - you can also re-use this function over and over and apply any color to it on the fly.
Aug 31 '07 #5
Expand|Select|Wrap|Line Numbers
  1. window.onload = function() {
  2. tds = document.getElementsByTagName("td")
  3.     for (x=0; x<tds.length; x++) {
  4.     tds[x].onclick = colorIt
  5.     }
  6. }
  7.  
  8. function colorIt() {
  9.     if (!this.color) { this.color = "off" }
  10.  
  11.     if (this.color == "off") {
  12.     this.color = "on"
  13.     this.style.background = "#000"
  14.     }
  15.  
  16.     else {
  17.     this.color = "off"
  18.     this.style.background = "#fff"
  19.     }
  20. }
  21.  
Or you can do something like that so you dont wanna to place function calls directly into the html!
Aug 31 '07 #6
banning
42
all of that up there... that i wrote... lol ignore it... i was lookin at your code... and like i said before i'm learning javascript, fortunatly its pretty close to AS but anyway... i say there is an onclick function thats pretty nifty... i may have to empliment that so i dont have functions right in the html :)
Aug 31 '07 #7
banning
42
Heya, Banning.

Try using the name property, which does not have to be unique:
Expand|Select|Wrap|Line Numbers
  1. <td name="myName" ... >
  2. .
  3. .
  4. .
  5. <td name="myName" ... >
  6.  
Expand|Select|Wrap|Line Numbers
  1. var tds = document.getElementsByName('myName');
  2. for( var i = 0; i < tds.length; ++i )
  3. {
  4.     tds[i].style.backgroundColor = 'annoyingly bright neon peach';
  5. }
  6.  
i tried that code and it works great in firefox but it wont work in IE... i tried using
Expand|Select|Wrap|Line Numbers
  1. document.write(tds)
after
Expand|Select|Wrap|Line Numbers
  1.  var tds = document.getElementsByName('myName'); 
but before the
Expand|Select|Wrap|Line Numbers
  1. for( var i = 0; i < tds.length; ++i )
and what i got in IE was [object] and in FireFox i get [object HTMLCollection]

im trying to teach myself javascript and im sure there is something there that the document.write is telling me LOL i just dont know what to do with that information

if you want to see the site im using it on you can find it here...
http://www.doughxpress.com/staging/d...ilsElec?Wid=76
Sep 7 '07 #8
pbmods
5,821 Expert 4TB
Heya, Banning.

First off, you might like this:
[CODE=javascript]
JavaScript goes here.
[/code]

~_^

Now then.

Does IE throw an error at you? Or does your script just seem not to do anything?
Sep 7 '07 #9
banning
42
Heya, Banning.

First off, you might like this:
Expand|Select|Wrap|Line Numbers
  1. JavaScript goes here.
  2.  
~_^

Now then.

Does IE throw an error at you? Or does your script just seem not to do anything?
Thanks about the code thing can I do CODE=php and stuff too?

and I don't get any errors coming up in IE it just doesn't do anything
Sep 10 '07 #10
iam_clint
1,208 Expert 1GB
do this
Expand|Select|Wrap|Line Numbers
  1. document.write(tds.length);
sometimes IE has a problem pulling names where the id's are the same.

the number it writes to the page should be > 0
Sep 10 '07 #11
drhowarddrfine
7,435 Expert 4TB
Try using the name property, which does not have to be unique:
This is what 'class' is for. Just change all the ids to 'class='.
Sep 10 '07 #12
banning
42
do this
Expand|Select|Wrap|Line Numbers
  1. document.write(tds.length);
sometimes IE has a problem pulling names where the id's are the same.

the number it writes to the page should be > 0

I tried it and it wrote back 0

it didnt write > 0
Sep 11 '07 #13
banning
42
This is what 'class' is for. Just change all the ids to 'class='.

change all the name= to class= ?

if i do that then i cant use getElementsByName right? and as far as i know there is no getElementByClass
Sep 11 '07 #14
drhowarddrfine
7,435 Expert 4TB
No. Change the id's to class. id can only be used once per page. Class can be used for multiple elements.
Sep 11 '07 #15
banning
42
No. Change the id's to class. id can only be used once per page. Class can be used for multiple elements.

im not using Id thought im using name
Sep 11 '07 #16
drhowarddrfine
7,435 Expert 4TB
In your initial post you show using 'id' so I assumed you still were.
Sep 11 '07 #17
banning
42
In your initial post you show using 'id' so I assumed you still were.

nah i went ahead with pbmods solution

Expand|Select|Wrap|Line Numbers
  1.  
  2. <td name="myName" ... >
  3.  
  4.  
  5. <td name="myName" ... >
  6.  
Expand|Select|Wrap|Line Numbers
  1.       var tds = document.getElementsByName('myName');
  2.       for( var i = 0; i < tds.length; ++i )
  3.       {
  4.           tds[i].style.backgroundColor = 'annoyingly bright neon peach';
  5.       }
  6.  
Sep 11 '07 #18
banning
42
do this
Expand|Select|Wrap|Line Numbers
  1. document.write(tds.length);
sometimes IE has a problem pulling names where the id's are the same.

the number it writes to the page should be > 0

see when i do this in IE it comes out as 0
but when i do it in FIREFOX it comes out as 41
Sep 11 '07 #19
acoder
16,027 Expert Mod 8TB
see when i do this in IE it comes out as 0
but when i do it in FIREFOX it comes out as 41
I think that IE has problems with tds and getElementsByName. A bit of testing shows that it just doesn't work. Give your table an id and try:
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('tableID').getElementsByTagName("td");
Sep 13 '07 #20
banning
42
I think that IE has problems with tds and getElementsByName. A bit of testing shows that it just doesn't work. Give your table an id and try:
Expand|Select|Wrap|Line Numbers
  1. document.getElementById('tableID').getElementsByTagName("td");
when i try that it turns the whole table the color... what im trying to accomplish is just turn an individual column one color. course you probably all ready know that but yea i tried it and it worked in firefox and ie like it should :)
Sep 14 '07 #21
acoder
16,027 Expert Mod 8TB
when i try that it turns the whole table the color... what im trying to accomplish is just turn an individual column one color. course you probably all ready know that but yea i tried it and it worked in firefox and ie like it should :)
So have you got it working or not?
Sep 16 '07 #22
banning
42
So have you got it working or not?

no its not working... ie just sucks i guess... when i do what you posted it just turns the whole table a colour... i dont want that, i want to highlight just one column...

here is the site im using it on, http://doughxpress.com/staging/dryerDetailsElec?Wid=76
Sep 17 '07 #23
iam_clint
1,208 Expert 1GB
Heres a sample i made for you highlighting rows and cols without using names and works in firefox and ie. To use the code you will need to change your table accordingly.
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. vertColor="#66ffcc"
  3. horzColor="#b7efff";
  4.  
  5. function vertClick(col, tbl) {
  6.     var color="";
  7.     var table = document.getElementById(tbl);
  8.     var entireRow=table.getElementsByTagName("tr");
  9.     var curColor = entireRow[0].getElementsByTagName("td")[col].style.backgroundColor;
  10.     for (i=0; i<entireRow.length; i++) {
  11.         curEle = entireRow[i].getElementsByTagName("td")[col];
  12.         if (curEle.getAttribute("vert")==null || curEle.getAttribute("vert")=="false") { curEle.setAttribute("vert", "true"); color = vertColor; } else { curEle.setAttribute("vert", "false"); color=""; }
  13.         if (color=="" && curEle.getAttribute("horz")=="true") { curEle.style.backgroundColor=horzColor; } else { curEle.style.backgroundColor=color; }
  14.     }
  15. }
  16.  
  17. function horzClick(row, tbl) {
  18.     var color="";
  19.     var table = document.getElementById(tbl);
  20.     var entireRow=table.getElementsByTagName("tr")[row-1];
  21.     var tds = entireRow.getElementsByTagName("td");
  22.     var curColor = tds[1].style.backgroundColor;
  23.     for (i=1; i<tds.length; i++) {
  24.         curEle = tds[i];
  25.         if (curEle.getAttribute("horz")==null || curEle.getAttribute("horz")=="false") { curEle.setAttribute("horz", "true"); color = horzColor; } else { curEle.setAttribute("horz", "false"); color=""; }
  26.         if (curEle.getAttribute("vert")=="true") { curEle.style.backgroundColor=vertColor; } else {  curEle.style.backgroundColor = color; }
  27.     }
  28. }
  29. </script>
  30. <STYLE>
  31. tr { cursor: pointer; }
  32. table { border-collapse: collapse; width: 100%; height: 100%;}
  33. </STYLE>
  34. <table border=1>
  35. <tbody id="example">
  36. <tr><td  onclick="horzClick('1', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  37. <tr><td  onclick="horzClick('2', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  38. <tr><td  onclick="horzClick('3', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  39. <tr><td  onclick="horzClick('4', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  40. <tr><td  onclick="horzClick('5', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  41. <tr><td  onclick="horzClick('6', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  42. <tr><td  onclick="horzClick('7', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  43. <tr><td  onclick="horzClick('8', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  44. <tr><td  onclick="horzClick('9', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  45. <tr><td  onclick="horzClick('10', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  46. <tr><td  onclick="horzClick('11', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  47. <tr><td  onclick="horzClick('12', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  48. <tr><td  onclick="horzClick('13', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  49. <tr><td  onclick="horzClick('14', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  50. <tr><td  onclick="horzClick('15', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  51. <tr><td  onclick="horzClick('16', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  52.  
  53. </tbody>
  54. </table>
  55.  
This code should do exactly what you want in all browsers!
Sep 17 '07 #24
iam_clint
1,208 Expert 1GB
Code fixed for colspan checks

Expand|Select|Wrap|Line Numbers
  1. <script>
  2. vertColor="#66ffcc"
  3. horzColor="#b7efff";
  4.  
  5. function vertClick(col, tbl) {
  6.     var color="";
  7.     var blnColSpan = false;
  8.     var table = document.getElementById(tbl);
  9.     var entireRow=table.getElementsByTagName("tr");
  10.     for (i=0; i<entireRow.length; i++) {
  11.         curEle = entireRow[i].getElementsByTagName("td")[col];
  12.         for (b=0; b<entireRow[i].getElementsByTagName("td").length; b++) { 
  13.             colspan = entireRow[i].getElementsByTagName("td")[b].getAttribute("colspan");
  14.             if (colspan!=null && colspan!=1) { blnColSpan = true; }
  15.         }
  16.         if (!blnColSpan) { 
  17.             if (typeof(curEle)=="object") {
  18.                 if (curEle.getAttribute("vert")==null || curEle.getAttribute("vert")=="false") { curEle.setAttribute("vert", "true"); color = vertColor; } else { curEle.setAttribute("vert", "false"); color=""; }
  19.                 if (color=="" && curEle.getAttribute("horz")=="true") { curEle.style.backgroundColor=horzColor; } else { curEle.style.backgroundColor=color; }
  20.             }
  21.         }
  22.         blnColSpan = false;
  23.     }
  24. }
  25.  
  26. function horzClick(row, tbl) {
  27.     var color="";
  28.     var table = document.getElementById(tbl);
  29.     var entireRow=table.getElementsByTagName("tr")[row-1];
  30.     var tds = entireRow.getElementsByTagName("td");
  31.     for (i=1; i<tds.length; i++) {
  32.         curEle = tds[i];
  33.         if (curEle.getAttribute("horz")==null || curEle.getAttribute("horz")=="false") { curEle.setAttribute("horz", "true"); color = horzColor; } else { curEle.setAttribute("horz", "false"); color=""; }
  34.         if (curEle.getAttribute("vert")=="true") { curEle.style.backgroundColor=vertColor; } else {  curEle.style.backgroundColor = color; }
  35.     }
  36. }
  37. </script>
  38.  
Sep 17 '07 #25
iam_clint
1,208 Expert 1GB
This is the same thing except theres an intersecting color.
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. /* Javascript written by iam_clint */
  3. vertColor="#66ffcc";
  4. horzColor="#b7efff";
  5. intersectColor="#aa22f0";
  6.  
  7. function vertClick(col, tbl) {
  8.     var color="";
  9.     var blnColSpan = false;
  10.     var table = document.getElementById(tbl);
  11.     var entireRow=table.getElementsByTagName("tr");
  12.     for (i=0; i<entireRow.length; i++) {
  13.         curEle = entireRow[i].getElementsByTagName("td")[col];
  14.         for (b=0; b<entireRow[i].getElementsByTagName("td").length; b++) { 
  15.             colspan = entireRow[i].getElementsByTagName("td")[b].getAttribute("colspan");
  16.             if (colspan!=null && colspan!=1) { blnColSpan = true; }
  17.         }
  18.         if (!blnColSpan) { 
  19.             if (typeof(curEle)=="object") {
  20.                 if (curEle.getAttribute("vert")==null || curEle.getAttribute("vert")=="false") { curEle.setAttribute("vert", "true"); color = vertColor; } else { curEle.setAttribute("vert", "false"); color=""; }
  21.                 if (curEle.getAttribute("horz")=="true" && curEle.getAttribute("vert")=="true") { curEle.style.backgroundColor=intersectColor; } else if (curEle.getAttribute("vert")=="false" && curEle.getAttribute("horz")=="true") { curEle.style.backgroundColor=horzColor; } else { curEle.style.backgroundColor=color; }
  22.             }
  23.         }
  24.         blnColSpan = false;
  25.     }
  26. }
  27.  
  28. function horzClick(row, tbl) {
  29.     var color="";
  30.     var table = document.getElementById(tbl);
  31.     var entireRow=table.getElementsByTagName("tr")[row-1];
  32.     var tds = entireRow.getElementsByTagName("td");
  33.     for (i=1; i<tds.length; i++) {
  34.         curEle = tds[i];
  35.         if (curEle.getAttribute("horz")==null || curEle.getAttribute("horz")=="false") { curEle.setAttribute("horz", "true"); color = horzColor; } else { curEle.setAttribute("horz", "false"); color=""; }
  36.         if (curEle.getAttribute("vert")=="true" && curEle.getAttribute("horz")=="true") { curEle.style.backgroundColor=intersectColor; } else if (curEle.getAttribute("vert")=="true" && curEle.getAttribute("horz")=="false") {  curEle.style.backgroundColor = vertColor; } else { curEle.style.backgroundColor = color;  }
  37.     }
  38. }
  39. </script>
  40. <STYLE>
  41. tr { cursor: pointer; }
  42. table { border-collapse: collapse; width: 100%; height: 100%;}
  43. </STYLE>
  44. <table border=1>
  45. <tbody id="example">
  46. <tr><td  onclick="horzClick('1', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  47. <tr><td  onclick="horzClick('2', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  48. <tr><td  onclick="horzClick('3', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  49. <tr><td  onclick="horzClick('4', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  50. <tr><td  onclick="horzClick('5', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  51. <tr><td  onclick="horzClick('6', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  52. <tr><td  onclick="horzClick('7', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  53. <tr><td  onclick="horzClick('8', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  54. <tr><td  onclick="horzClick('9', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  55. <tr><td  onclick="horzClick('10', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  56. <tr><td  onclick="horzClick('11', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  57. <tr><td  onclick="horzClick('12', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  58. <tr><td  onclick="horzClick('13', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  59. <tr><td  onclick="horzClick('14', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  60. <tr><td  onclick="horzClick('15', 'example');">Test1<td onclick="vertClick('1', 'example');">Test2<td onclick="vertClick('2', 'example');">Test3<td onclick="vertClick('3', 'example');">Test4<td onclick="vertClick('4', 'example');">Test5<td onclick="vertClick('5', 'example');">Test6
  61.  
  62. </tbody>
  63. </table>
  64.  
  65.  
Sep 18 '07 #26
banning
42
This is the same thing except theres an intersecting color.

This is the answer too
Sep 18 '07 #27

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

24 posts views Thread by Robi | last post: by
3 posts views Thread by palak123i | last post: by

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.