2010-11-02 8 views
2

Débutant demander:ExtJS Ajax Appel

Quelque chose m'a manqué?

scripts Loaded

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

Code

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; 
     } 
    }); 
}); 

-de post.php brut

echo "this is response text";

erreur Firebug

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

erreur Chrome

Uncaught TypeError: Cannot call method 'indexOf' of undefined

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

Mis à jour/Fixe

Désolé, mon mauvais. J'ai raté echo ici url: '<?php $template_url."/raw-post.php" ?>',

Répondre

4

J'ai raté echo ici url: '<?php $template_url."/raw-post.php" ?>',