User:Iritscen/TestSpace.js: Difference between revisions

infinite loop?!
(oops, can't continue outside a loop)
(infinite loop?!)
Line 11: Line 11:
   var divs = document.getElementsByTagName("div");
   var divs = document.getElementsByTagName("div");
   if (!divs) return;
   if (!divs) return;
  alert("Checking for sortable table.");
   for (var i = 0; i < divs.length; i++)
   for (var i = 0; i < divs.length; i++)
   {
   {
Line 17: Line 16:
       var tables = theDiv.getElementsByTagName("table");
       var tables = theDiv.getElementsByTagName("table");
       if (!tables) continue;
       if (!tables) continue;
      alert("Found a table.");
       for (var j = 0; j < tables.length; j++)
       for (var j = 0; j < tables.length; j++)
       {
       {
        alert("Looking at table " + j);
         var theTable = tables[j];
         var theTable = tables[j];
         // If we found a sortable table...
         // If we found a sortable table...