PDA

View Full Version : XML not loading from PHP through server, but working through file system


elainechg
04-18-2002, 02:25 AM
I have a flash file embedded in an html page,which uses XML generated from a PHP script to dynamically generate a menu system. For some reason, when I try to access the html page through it's url web address, the XML does not load up. However, when I open the html page by double-clicking on the file in the htdocs folder, the XML loads up fine. When I access the PHP script from its url, it does return XML. Any ideas??

Any help would be greatly appreciated.

Basically, the flash is able to load up the XML and everything works fine when opened from the file system, but it's not returned XML when the file is accessed through the server.

Thanks so much.

hangalot
04-18-2002, 07:50 AM
r u using the xml.load(url) object?

It could be that the xml file has not finished loading... in which case u shoul trap the onLoad event to notify u when this occurs.

elainechg
04-18-2002, 09:23 PM
This is the code that I have currently. Is this what you mean by trapping the onLoad event?

function load_data (file) {
dummy_xml = new XML();
dummy_xml.onLoad = myLoad;
dummy_xml.load(file);
}

function myLoad() {
// loads in the xml data...
...
}

Thank you so much.