[thelist] Syncronization with JavaScript

Brad Miller brad at beldamar.com
Wed Jul 31 23:04:09 CDT 2002


I hope I can get some ideas from all of you on how to solve a problem.
I have a Table of Contents that is being generated on the fly by about 40
XML files using JavaScript.
I need to setup a syncronization script that when a page is loaded the Table
of Contents is then sync'd to that entry.
That really isn't all that hard, the hard part is that most of the files are
not downloaded to the client yet.
All of the entries in a single HTML file is about 160k and it is too big to
download all the time.
So I broke it up into many little XML files that is easy to maintain. Right
now the JS parses the XML and displays it using MSXML. I don't have to
support anything but IE 5.5 and up so I am not worried about that. So when a
user clicks on an entry in the TOC that XML file is loaded and displayed.
This is a tree structure just like Windows Explorer.

So the problem is how do I sync with entries that the client has not
downloaded yet?
This needs to be easy to maintain as well because we are adding and
subtracting things from the TOC constantly.
My original thought was to keep a list of all the files in a seperate text
file but that became rediculous with the 1200+ entries. Not only that but I
have files that may be in the TOC more than once. So when I parse through
that file I need to get the correct entry, not just the first one that I
come across in a list.

Any ideas would be greatly appreciated.


Brad Miller
www.beldamar.com
www.x-etc.com
brad at beldamar.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A virus in a document is OK
(provided the DTD allows it)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the thelist mailing list