| [SOLVED] Why Javascript function doesn't work in my program? Hi Friends,
Currently I'm working in the struts 1.1 envi. I am using layout tag to create the dynamic multiple columns table. In which I include the one more functionality called selectable row in a table. For this I have the javascript function. When I run the project, the javascript which i wrote for select a row with certain color is not working.
Please refer me what is the problem I am facing.
I have attached my javascript program here:
<script type="text/javascript">
var lastSelRow = null;var node = null;
function changeRowColor(node){unSelect();
children = node.getElementsByTagname("td");
alert("I'm an alert box!");
for(i=0;children.length();i++){
children[i].style.backgroundColor = '#FBE797';
}lastSelRow = node;}
function unSelect()
{if(lastSelRow){
children = lastSelRow.getElementsByTagName("td");
for(i=0;i<children.length();i++){
children[i].style.backgroundColor = '#FFFFFF';
}}
lastSelRow = null;}</script> |