![]() |
ResponseXML
Hello, I've been trying to figure out this problem out for almost 3 hours now and I've looked all over the web and I can't really find any good tutorial help on this.
The following script works fine with request.responseText; Code:
<html>PHP Code:
What am I doing wrong here? Error Message: Webpage error details User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) Timestamp: Wed, 21 Oct 2009 07:53:16 UTC Message: Object doesn't support this property or method Line: 28 Char: 3 Code: 0 Message: Object doesn't support this property or method Line: 28 Char: 3 Code: 0 Message: Object doesn't support this property or method Line: 28 Char: 3 Code: 0 |
Your Not Telling AJAX its an XML File you missing the XML Header go lookup on XML Standards,
echo "<?xml version="1.0" encoding="iso-8859-1"?>"; and make sure you echo it coz that header in php buggs if short tags are allowed |
Okay this is something I have already tried before. I still get a error back from JavaScript.
|
There is a typing mistake.
You should replace: Code:
getElementByTagNameCode:
getElementsByTagName |
As much as I would like to say that work, it did not. I'm still getting the same error.
|
Can you please insert these two lines:
Code:
alert(request.parseError.reason)Code:
if(request.readyState == 4) { |
I put that in my code and it isn't popping up with a error or anything. Not to sure why though.
|
No problem for that this is specific for IE I think and it does not work on other browsers anyway replace the code that I have posted in the previous reply with the following;
Code:
alert(request.responseText); |
<?xml version="1.0"?><tutorial><views>164</views><short>There is some updates that you will have to make sure that you install. So if you are unsure how to do this then this tutorial will explain step by step how to do that.</short></tutorial>
XML is coming out fine. I just simply don't get it. |
ok now would you try this:
Code:
alert(request.responseXML.xml) |
undefined
|
try adding the CDATA section to the short tag as follows:
Code:
echo "<short id=\"2\"><![CDATA[".$title."]]></short>"; |
The alert stays the same. undefined
|
Do you have a link to the page?
|
Code:
<html> |
| All times are GMT +1. The time now is 07:02 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.