我在firebug控制台中得到了index.php.html
I get index.php html in firebug console
我有一个ext-js面板组件,当提交时,它会在firebug控制台中抛出js错误。我说
'You're trying to decode an invalid JSON String: <html>
... index.php html code here
</html><!-- use login javascript file --> <!--<script type="text/javascript" src="http://localhost:9808/recorder/js/login.js"></script>-->
<script type="text/javascript">
login = true;
</script>
<div id="login_window"> </div>' when calling method:
[nsIDOMEventListener::handleEvent]
交互作用是html代码与"html"标记后的一些附加html连接在一起。我得到的是index.php.html代码,而不是json。至于我调用的check()函数,我只调用ecoes的json数据。
我的组件代码是这样的
login_group_combo = Ext.create('Ext.form.ComboBox',
{
name: 'combo_name',
id: 'combo_id',
fieldLabel: text_label,
editable: false,
//possible view options
store: [
],
listeners:
{
focus: function(elem, e)
{
function1();
}
}
});
函数1()看起来像这个
function function1(){
form1.submit({
url: './index.php/mypage/check',
success: function(f,a){
// some code here
echo json_encode($result_array);
},
failure: function(form, action){
switch (action.failureType) {
case Ext.form.action.Action.CLIENT_INVALID:
Ext.Msg.alert('Failure', 'Invalid data entered!');
break;
case Ext.form.action.Action.CONNECT_FAILURE:
Ext.Msg.alert('Failure', 'Ajax communication failed');
break;
case Ext.form.action.Action.SERVER_INVALID:
Ext.Msg.alert('Failure', action.result.msg);
}
}
});
}
有趣的是,执行进入函数1();但没有进入表格1,成功或两者都没有。可能是什么问题?
如果加载/index.php/mypage/在浏览器中查看源代码,你看到json还是html?通常,服务器框架中的某些内容是通过页眉和页脚布局代码或类似代码放入html中,并且需要设置一些配置,以便返回原始json字符串。
相关文章:
- 我在firebug控制台中得到了index.php.html
- 致命错误:函数名称必须是第 7 行 /home/User/public_html/website/index.php 中
- 代码点火器始终希望 index.php 访问控制器
- index.php中的多个jquery对话框
- 如何忽略所有的pathNames并在我的站点根目录下加载我的index.php
- PHP-没有在index.PHP上设置$_SESSION['var1']
- 当使用AJAX调用API时,网站在打开后重定向到index.php
- 如何删除index.php
- PHP在index.PHP中包含CSS和JS链接的文件
- 在使XMLHttpRequest到服务器头(“location:index.php”)函数不起作用时
- index.php:13 Uncaught SyntaxError: Unexpected token: Ci中的错误消
- 使用PHP 'Include'将多个页面链接到单个index.php页面
- 从javascript中调用url,其中url与index.php不在同一级别
- AJAX请求给出'undefined index'PHP错误
- 页面重新加载回到index.php
- 如何使用jquery从url中删除index.php
- 如何使用index.php?-url与colorbox
- 将所有请求重定向到index.php并在页面上显示URL
- 当页面为index.php时运行html代码
- 避免登录用户访问index.php