prototype.js问题+ easyphp [英] prototype.js problem + easyphp
问题描述
大家好,
我有一个问题,在EasyPHP 1.7下正确运行的javascripts
但不在EasyPHP 1.8或WAMP5 1.6下。
我正在使用prototype.js库。
我写了以下内容:
var url = ''simpleDocument.xml'';
var methode =''get'';
var myAjax = new Ajax.Request(url,{method:methode,onComplete:
analyseResponse});
及其他:
function analyseResponse(response){
alert(response.responseText);
alert(response.responseXML);
}
发生以下情况。
alert(response.responseText);
在所有情况下都正确显示simpleDocument.xml的内容。
alert(response.responseXML);
在EasyPHP 1.7下正确显示[object XMLDocument],但在EasyPHP下显示''null''
1.8和WAMP5。
预先感谢您的回复。
祝你好运,
Roger
Hello everyone,
I have a problem with javascripts that runs correctly under EasyPHP 1.7
but not under EasyPHP 1.8 nor WAMP5 1.6.
I am using the prototype.js library.
I wrote the following :
var url = ''simpleDocument.xml'';
var methode = ''get'';
var myAjax = new Ajax.Request( url, {method: methode, onComplete:
analyseResponse} );
and further :
function analyseResponse(response) {
alert(response.responseText);
alert(response.responseXML);
}
The following occurs.
alert(response.responseText);
displays correctly the contents of simpleDocument.xml in all cases.
alert(response.responseXML);
displays correctly [object XMLDocument] under EasyPHP 1.7, but ''null''
under EasyPHP 1.8 and WAMP5.
Thanks in advance for your responses.
Best regards,
Roger
推荐答案
Roger(波尔多)写道:
Roger (Bordeaux) wrote:
alert(response.responseXML);
显示在EasyPHP 1.7下正确[object XMLDocument],但EasyPHP 1.8和WAMP5下的'null''
。
alert(response.responseXML);
displays correctly [object XMLDocument] under EasyPHP 1.7, but ''null''
under EasyPHP 1.8 and WAMP5.
将EasyPHP 1.8和WAMP5设置为正确返回内容类型
(" text / xml")
Set both EasyPHP 1.8 and WAMP5 to return proper content type
("text/xml")
VKaécrit:
Roger (Bordeaux)写道:
Roger (Bordeaux) wrote:
alert(response.responseXML);
在EasyPHP 1.7下正确显示[object XMLDocument],但在EasyPHP下显示''null''
1.8和WAMP5。
alert(response.responseXML);
displays correctly [object XMLDocument] under EasyPHP 1.7, but ''null''
under EasyPHP 1.8 and WAMP5.
设置EasyPHP 1.8和WAMP5以返回正确的内容类型
(text / xml)
Set both EasyPHP 1.8 and WAMP5 to return proper content type
("text/xml")
感谢VK的回答。
我会四处寻找如何做到这一点。也许你可以给我一个
指示哪里可以找到这个?
祝你好运,
罗杰
Thanks VK for your answer.
I will look around to find how to do this. May be you can give a me
indication where to find this ?
Best regards,
Roger
Roger(波尔多)aécrit:
Roger (Bordeaux) a écrit :
VKaécrit:
VK a écrit :
Roger(波尔多)写道:
Roger (Bordeaux) wrote:
alert(response.responseXML);
在EasyPHP 1.7下正确显示[object XMLDocument],但在EasyPHP下显示
'null''
1.8和WAMP5。
alert(response.responseXML);
displays correctly [object XMLDocument] under EasyPHP 1.7, but
''null''
under EasyPHP 1.8 and WAMP5.
设置EasyPHP 1.8和WAMP5以返回正确的内容类型
(text / xml)
Set both EasyPHP 1.8 and WAMP5 to return proper content type
("text/xml")
感谢VK你的答案。
我会四处寻找如何做到这一点。也许你可以给我一个指示在哪里找到这个?
最好的问候,
Roger
Thanks VK for your answer.
I will look around to find how to do this. May be you can give a me
indication where to find this ?
Best regards,
Roger
PHP脚本缺少@header(" Content-Type:text / xml;
charset = UTF-8");声明。
最好的问候
Roger
The PHP script was missing an @header("Content-Type: text/xml;
charset=UTF-8"); statement.
Best regards
Roger
这篇关于prototype.js问题+ easyphp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!