使用 SEF URL 时 Internet Explorer 中的 Mootools 请求问题
在我的自定义 Joomla 1.6 组件中,Mootools 的请求仅在 IE 中以及启用语言过滤插件时才起作用。
我正在使用 Mootool 的请求从我回显的服务器端获取响应。
SEF URL 示例: http ://localhost/mysite/index.php/en/component/foo/113
请求:
function theRequest (){
var url = "http://localhost/mysite/index.php?&option=com_foo&task=search&view=foo&format=raw¶m=foo"
var a = new Request({
method: 'get',
url: url,
onComplete: function(response)
{
if(response == 'empty')
{
qresults.innerHTML = "";
}
else
{
qresults.innerHTML = response;
}
}
}).send();
}
有问题的响应
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/></head><body></html>
我的猜测是它与 URL 有关,并且在特别是启用语言过滤后引入的语言标签..因此我编辑了 router.php 来检查语言和 itemid 变量..没有任何帮助! 还尝试编辑Request并更改为onSuccess并将.innerHTML替换为.set('html',response),在IE中仍然是相同的回复!
你能建议一下吗?
In my custom Joomla 1.6 component Mootools's Request does not work only in IE and when the language filtering plugin is enabled.
I am using Mootool's Request for getting my response from the server side which I echo.
SEF URL example: http://localhost/mysite/index.php/en/component/foo/113
The request:
function theRequest (){
var url = "http://localhost/mysite/index.php?&option=com_foo&task=search&view=foo&format=raw¶m=foo"
var a = new Request({
method: 'get',
url: url,
onComplete: function(response)
{
if(response == 'empty')
{
qresults.innerHTML = "";
}
else
{
qresults.innerHTML = response;
}
}
}).send();
}
The problematic response
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/></head><body></html>
My guess was that it had something to do with the URL and in particular the language tag introduced after enabling language filtering..therefore I edited my router.php to also check for language and itemid vars..nothing helped!
Also tried to edit the Request and change to onSuccess and replaced .innerHTML to .set('html',response), still the same reply in IE!
Can you suggest something please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这与 Mootools 无关。您的回复不包含标签,即使这样我也不确定 IE 是否会处理它。 IE 不允许在 AJAX 响应中使用某些不完整标签的组合,例如某些内容不起作用,但某些内容可以。
I think this is not Mootools related. Your response doesn't contain a tag and even then I'm not sure it would be processed by IE I think. IE doesn't allow certain combinations of incomplete tags in AJAX responses, for example something doesn't work, but something does.