Changeset 1482

Show
Ignore:
Timestamp:
06/01/06 16:04:29 (3 years ago)
Author:
sdcosta
Message:

Fix for IE's "Operation Aborted" Error.
http://channel9.msdn.com/wiki/default.aspx/Channel9.InternetExplorerProgrammingBugs
http://forums.gregarius.net/comments.php?DiscussionID=258

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/cls/update.php

    r1468 r1482  
    259259        echo "</table>\n"; 
    260260        echo "<script type=\"text/javascript\">\n"; 
    261         echo "for (k =0; k < " . AJAX_PARALLEL_SIZE . "; k++){\n"; 
    262         echo "doUpdate();}\n</script>\n"; 
     261        echo "function runAjaxUpdate() { \n"; 
     262        echo "    for (k =0; k < " . AJAX_PARALLEL_SIZE . "; k++){\n"; 
     263        echo "    doUpdate();\n"; 
     264        echo "    }\n"; 
     265        echo "}\n"; 
     266        // Fix for IE's stupid "Operation Aborted" Error 
     267        echo "   if (window.addEventListener) window.addEventListener(\"load\",runAjaxUpdate,false); else if (window.attachEvent) window.attachEvent(\"onload\",runAjaxUpdate);\n"; 
     268        echo "</script>\n"; 
    263269    } 
    264270}