duanjiu4498 2010-11-02 01:50
浏览 77
已采纳

ExtJS Ajax调用

Newbie ask:

Did I miss something?

Loaded scripts

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

raw-post.php

echo "this is response text";

Firebug error

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

Chrome error

Uncaught TypeError: Cannot call method 'indexOf' of undefined

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

Updated/Fixed

Sorry, my bad. I missed echo here url: '<?php $template_url."/raw-post.php" ?>',

  • 写回答

1条回答 默认 最新

  • doubi4531 2010-11-02 02:00
    关注

    I missed echo here url: '<?php $template_url."/raw-post.php" ?>',

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Python时间序列如何拟合疏系数模型
  • ¥15 求学软件的前人们指明方向🥺
  • ¥50 如何增强飞上天的树莓派的热点信号强度,以使得笔记本可以在地面实现远程桌面连接
  • ¥15 MCNP里如何定义多个源?
  • ¥20 双层网络上信息-疾病传播
  • ¥50 paddlepaddle pinn
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 STM32驱动继电器