|
Posted by RobG on September 27, 2005, 1:29 am
Please log in for more thread options
shane-dated-1130371478.43db8f@cm.nu wrote:
> Hello all,
>
> I am working on a website for a bookstore and have run into a bit of a snag.
> I am trying to write a form where an admin can set the category for a book.
> However, categories can be of an arbitrary depth so I need something which
> resembles a windows "tree view." For example:
>
> Primary category Art and Architecture
> has subcategory history
> has subcategory African etc etc.
>
> I can't say in advance how deep the tree will go so don't know how many
> select boxes to place on the form. Are there any examples out there of a
> similar construction I can learn from. Though I do know html/cgi, I'm no
> JavaScript/dhtml expert which I assume this will involve. From the
> backend's point of view, the page would probably have to, when a category
> was selected, query the server which would return any subcategories, that
> part is simple enough. It's the frontend I am not sure of.
Try >>>-- comp.lang.javascript -->
In the meantime, you may want to have a look at how your thesaurus might
be delivered - for example, when "Art and Architecture" are selected,
fill a second select with all the sub-categories including 'history',
which when selected creates a third select with the categories with
'african', etc.
There is an article on XMLHttpRequest here:
<URL:http://developer.apple.com/internet/webcontent/xmlhttpreq.html>
And a cross-browser example here:
<URL:http://developer.apple.com/internet/webcontent/XMLHttpRequestExample/example.html>
--
Rob
|