php - ExtJS Ajax Call

693

Newbie ask:

Did I miss something?

Loaded scripts

http://extjs.cachefly.net/ext-3.2.1/adapter/ext/ext-base.jshttp://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 missedecho hereurl: '<?php $template_url."/raw-post.php" ?>',

631

Answer

Solution:

I missedecho hereurl: '<?php $template_url."/raw-post.php" ?>',

People are also looking for solutions to the problem: php, imap, email header, date fields

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.