2010-11-02 71 views
2

新手問:ExtJS阿賈克斯呼叫

我錯過了什麼嗎?

加載的腳本

http://extjs.cachefly.net/ext-3.2.1/adapter/ext/ext-base.js http://extjs.cachefly.net/ext-3.2.1/ext-all.js

代碼

Ext.onReady(function() { 
    Ext.Ajax.request({ 
     method: 'GET', 
     url: '<?php $template_url."/raw-post.php" ?>', 
     params: { Xc : 0, Xp : <?php echo '84'; ?> }, 
     success: function(result, request){ 
      Ext.get('test').dom.innerHTML = result.responseText; 
     } 
    }); 
}); 

原始post.php中

echo "this is response text";

螢火蟲錯誤

e is undefined; window.undefined=window.undefined;Ext=...window.attachEvent("onunload",a)}})();

鉻錯誤

Uncaught TypeError: Cannot call method 'indexOf' of undefined

================== =

更新/修正

對不起,我的壞。我錯過了echo這裏url: '<?php $template_url."/raw-post.php" ?>',

回答

4

我錯過echo這裏url: '<?php $template_url."/raw-post.php" ?>',