J
jhoff
So, I'm in a pickle...
Lets say I have a page: http://www.gen2host.com/discgolf/index.html
and on this page, there are a list of links. These links will be
generated by 5 pieces of data pulled from each .xml file in a
subdirectory on the webserver.
Ex <A Href=" [DATA1] "> [DATA2] </a> [DATA3,4,5] as text.
Now, that being said, I have finished writing the javascript that
solves this problem by using a XMLHttpRequest on each file to be in
parsed. And If, at the end of each file being parsed, I spit my output
to the InnerHTML of a div, the page turns out looking ok...
( now heres the problem )
....except for the fact that all of the links seem to be in random
order. More specifically, they order themselves based on the time that
each xml file finished parsing.
In an attempt to sort all of the links before spitting them out on to
the div, I'm thinking of loading all of the data into a dynamic array
with each value consisting of an array of 5 values.
In the code posted above, I have successfully created the dynamic
array. My last attempt to get closer to fixing my sorted array problem
was to try using an onload statement, but it appears that when the page
is loaded, the XMLHttpRequests are still parsing, so It tells me the
array is null.
Any thoughts on how one might start a function once all of the
XMLHttpRequests have completed?
(sorry if none of that made any logical sense to anyone but me...)
Lets say I have a page: http://www.gen2host.com/discgolf/index.html
and on this page, there are a list of links. These links will be
generated by 5 pieces of data pulled from each .xml file in a
subdirectory on the webserver.
Ex <A Href=" [DATA1] "> [DATA2] </a> [DATA3,4,5] as text.
Now, that being said, I have finished writing the javascript that
solves this problem by using a XMLHttpRequest on each file to be in
parsed. And If, at the end of each file being parsed, I spit my output
to the InnerHTML of a div, the page turns out looking ok...
( now heres the problem )
....except for the fact that all of the links seem to be in random
order. More specifically, they order themselves based on the time that
each xml file finished parsing.
In an attempt to sort all of the links before spitting them out on to
the div, I'm thinking of loading all of the data into a dynamic array
with each value consisting of an array of 5 values.
In the code posted above, I have successfully created the dynamic
array. My last attempt to get closer to fixing my sorted array problem
was to try using an onload statement, but it appears that when the page
is loaded, the XMLHttpRequests are still parsing, so It tells me the
array is null.
Any thoughts on how one might start a function once all of the
XMLHttpRequests have completed?
(sorry if none of that made any logical sense to anyone but me...)