While doesn't work

Posted by Artem on Stack Overflow See other posts from Stack Overflow or by Artem
Published on 2010-05-14T17:46:47Z Indexed on 2010/05/14 17:54 UTC
Read the original article Hit count: 256

Filed under:
function Sort(td)
    {
        var t=document.getElementById("theList");
        var rows=t.getElementsByTagName("td");
        var cells=t.cells;
        var bb=true;
        while(bb==true)
        {
        alert(bb);
          for(var i=1;i<rows.length;i++)
           {
               if(cells[td.cellIndex+i*4].innerText<cells[td.cellIndex+(i+1)*4].innerText)
                {

                }
            }
        alert("Works");
        }
    }

The second alert will not be used. Can you tell me why?enter code here

© Stack Overflow or respective owner

Related posts about JavaScript