Page 1 of 1

How to highlight a table cell when clicked...why doesn't this work?

Posted: Fri Mar 16, 2012 3:29 pm
by Michael Talley

why doesn't this work for hilighting a grid cell when clicked, assuming the function is called when the cell is clicked:

function hiLight() {

var table = Tiggr("stratGrid");

table.style.backgroundColor="white";

var cells = table.getElementsByTagName("td");

for (var i=0; i < cells.length; i++) {
var divs = cells.getElementsByTagName("div");

for (var j=0;, j < divs.length; j++ {
var status = divs[j].getAttribute("data-role");

Code: Select all

if (status == "tiggr_label") { 
 var label = divs[j]; 

 if (label.val == localStorage.getItem('v_strat_id') { 
  cells[i].style.backgroundColor="red"; 
 } 
} 

}
}
};


How to highlight a table cell when clicked...why doesn't this work?

Posted: Fri Mar 16, 2012 3:35 pm
by Julia Babenko

Hello Michael,

Can you share the app link?


How to highlight a table cell when clicked...why doesn't this work?

Posted: Fri Mar 16, 2012 4:19 pm
by Michael Talley

Sure, how do I email it to you?


How to highlight a table cell when clicked...why doesn't this work?

Posted: Fri Mar 16, 2012 4:26 pm
by Julia Babenko

Please email it at a href="mailto:support@tiggzi.com" rel="nofollow"support@tiggzi.com/a