Michael Talley
Posts: 0
Joined: Wed Mar 14, 2012 8:55 pm

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

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"; 
 } 
} 

}
}
};

Julia Babenko
Posts: 0
Joined: Fri Feb 24, 2012 7:49 am

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

Hello Michael,

Can you share the app link?

Michael Talley
Posts: 0
Joined: Wed Mar 14, 2012 8:55 pm

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

Sure, how do I email it to you?

Julia Babenko
Posts: 0
Joined: Fri Feb 24, 2012 7:49 am

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

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

Return to “Issues”