2010-08-22 23 views
0

我使用javascript的Ajax.Request不能在IE

我使用ajax的函數原型這FF而不是在IE

VAR MOList_VenuePostBox工作完全正常工作;

function getPreSearch(tid,tname){ 

include_js("http://" + getHostPath() + "/_scripts/lib/z_autocomplete_messagecenter.js", 
function() { 
      //,{fetchFile:'/ajax/spot/getmyspots.aspx'} 
     MOList_VenuePostBox = new MOList('txtTagTheItem_VenueProfile', 'molist-auto1'); 
     var counter = 0; 

     // fetch and feed 
     new Ajax.Request('/_service/getTagwordsByName.ashx', { 
      onSuccess: function(transport) { 
       transport.responseText.evalJSON(true).each(function(t) 
       { 
        MOList_VenuePostBox.autoFeed(t); 
       }); 
      } 
     });                     
}); 
} 

在此先感謝

+0

IE的什麼版本? – jdc0589 2010-08-22 01:34:52

+0

我正在使用IE 7和IE 8 它不適用於他們兩個 – praveen 2010-08-22 01:38:49

+0

把'onSuccess'的引號不能解決問題嗎? – mhitza 2010-08-22 02:02:54

回答

0

我剛過方法得到

它解決了我的問題

0
include_js("http://" + getHostPath() + "/_scripts/lib/z_autocomplete_messagecenter.js", 
function() { 
    //,{fetchFile:'/ajax/spot/getmyspots.aspx'} 
    MOList_VenuePostBox = new MOList('txtTagTheItem_VenueProfile', 'molist-auto1'); 
    var counter = 0; 

    // fetch and feed 
    new Ajax.Request('/_service/getTagwordsByName.ashx', { 
     method:get, 
     onSuccess: function(transport) { 
      transport.responseText.evalJSON(true).each(function(t) 
      { 
       MOList_VenuePostBox.autoFeed(t); 
      }); 
     } 
    });    
});