Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XML Object not being initialized

Status
Not open for further replies.

gregotte

Programmer
Feb 27, 2001
8
0
0
US
Ok, here is the situation. I have a web page that has some in-line XML that is generated from backend c#. This is working just fine. The page also contains some JavaScript that parses the XML. Everything works part of the time. The main problem is the XML object doesn't get initialized every time, and the parse function crash. If you hit refresh a few times it will suddenly work. I thought it may be a timing problem (the parse function being run before the XML is done being loaded), but it's not. I added some time delay stuff, but the XML object never gets initialized. I even created a static version of the page (without the backend stuff) and it still only works half the time. If anyone has any ideas, let me know.
 
Are you setting the async property of the XML object?

ie myXMLObject.async = false;

will force the load of the XML data into the object to complete before continuing with the script.

[sub]Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.
[/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top