Click here to get back home

Creating a category tree

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Creating a category tree shane-dated-1130371478.43db8f 09-27-2005
Get Chitika Premium
Posted by shane-dated-1130371478.43db8f on September 27, 2005, 12:13 am
Please log in for more thread options


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.

Thanks,
Shane

Posted by Jim Moe on September 27, 2005, 12:11 am
Please log in for more thread options


shane-dated-1130371478.43db8f@cm.nu wrote:
>
> 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. [...]
>
Server-side programs like PHP, JSP, ASP and even perl are often used to
create dynamically generated pages. CGI is less common because it's
noticeably more difficult to use.
Web commerce/shopping programs often have support for categories.
Search for some that make the source code available.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)

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

Similar ThreadsPosted
Help with multi level category navigation April 11, 2006, 1:50 pm
tree menu in dhtml September 15, 2004, 1:12 am
Problem with Tree view December 14, 2006, 12:42 am
Could HTML and XHTML be characterized by a DOM tree? January 9, 2005, 8:37 am
creating an index July 18, 2004, 1:25 am
Creating a timeline. September 7, 2006, 12:50 am
Creating Discussion Forums January 23, 2005, 7:03 am
creating your own webpage background January 4, 2006, 9:21 pm
creating your own webpage background January 4, 2006, 9:21 pm
Keep Gmail from creating a link from URL October 23, 2008, 11:57 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap