Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8259: ajax_ie7_filesystem.diff

File ajax_ie7_filesystem.diff, 1.2 kB (added by jdalton, 9 months ago)
  • ajax.js

    old new  
    11var Ajax = { 
    22  getTransport: function() { 
    3     return Try.these( 
    4       function() {return new XMLHttpRequest()}, 
    5       function() {return new ActiveXObject('Msxml2.XMLHTTP')}, 
    6       function() {return new ActiveXObject('Microsoft.XMLHTTP')} 
    7     ) || false; 
     3      var transport = false; 
     4      Ajax.getTransport = Try.these( 
     5        function() { 
     6          /* fallback on activex xmlhttp to avoid IE7 local file-system read error */ 
     7          if(Prototype.Browser.IE && window.location.href.indexOf('file://') == 0) throw 'skip'; 
     8          transport = new XMLHttpRequest(); 
     9          return function(){ return new XMLHttpRequest()} 
     10        }, 
     11        function() { 
     12          transport = new ActiveXObject('Msxml2.XMLHTTP'); 
     13          return function(){ return new ActiveXObject('Msxml2.XMLHTTP')} 
     14        }, 
     15        function() { 
     16          transport = new ActiveXObject('Microsoft.XMLHTTP'); 
     17          return function(){ return new ActiveXObject('Microsoft.XMLHTTP')} 
     18        } 
     19      ) || false; 
     20       
     21      return transport; 
    822  }, 
    923   
    1024  activeRequestCount: 0