![]() |
XMLHTTPRequest Help in IE
Hey, I hope I've placed this in the right place. I need help with XMLHTTPRequest and Internet Explorer.
Hokey, a little background. I'm creating a script with mainly PHP & XHTML and I am using XMLHTTPRequest to retrieve data from another PHP script and display it. I've got it to work with the Firefox, Mozilla, Opera and Netscape browser, yet IE does not like it. I have these JavaScript functions in the head of my page: :
<script type="text/javascript">The first function sends the request to the PHP script and calls in the second function to display it. The second function gets some <span>'s from within the <div> named "fileinfo" and uses the XML values from the PHP script ("default.php?a=fi&name=") to echo them. The PHP script to echo the XML goes as: [PHP]<?php header ("Content-Type: text/xml"); $file = $_GET['name']; echo("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?> <response> <type>" . $file . "</type> <description>" . $file . "</description> </response>"); return 0; ?> [/PHP] The above XML is just to test, and will be modified with time. Hokey, my problem? IE does not display the information in the <div> named "fileinfo" but it does go as far as displaying the <div>, but goes no further. Here is the error I get from IE: :
Line: 43The bit where the <div> is shown goes as follows: :
<div id="fileinfo">If anyone can help me, it'd be apreciated. If you have MSN, please add me if you have a solution: sunnyboy01235@gmail.com. Thanks in advance, Sunny |
Can I ask why you don't just read the XML file using PHP? Or why you're even generating one in the first place?
|
The XML file is generated using the PHP. It'd be changed everytime a different link is clicked - the output is different for each of my linkc clicked and is independant on the link.
|
I see. In that case, I don't think I can help you - I have no experience with XMLHTTPRequest. Anyone else?
|
:
Line: 43 |
| All times are GMT -5. The time now is 12:58 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC