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 2 4501 sh************* **************@ 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.javas cript -->
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/XMLHttpRequestE xample/example.html>
--
Rob sh************* **************@ 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) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Brian Murphy |
last post by:
<?php
/*
I need your help. I'd be very thankfull if write me this script.I
need a script that displays a list of categories and subcategories
like this:
<select name="category">
<option value="1">Main</option>
<option value="2">Main > Computers</option>
<option value="4">Main > Computers > Hardware </option>
|
by: Troy Lynch |
last post by:
I'm looking into writing a Category Hierarchy on a site I've written
and am looking for some information about writing this kind of code.
Maybe some samples or a book. Any information would be helpful.
Thanks,
Troy Lynch
|
by: Ted |
last post by:
I am currently putting together an eCommerce site. I have almost everything
in place, but I am not happy with the category system for our products.
There are around 2500 products in a SQL Sever db, each assigned 1 of 300 odd
categories. Currently, I have statically built the category tree but wish to
automate this task as it is becoming increasingly difficult to manage.
I have googled plenty of info, specifically for ADO data shaping....
|
by: Travis Pupkin |
last post by:
Hey,
I've done a number of product catalogs/galleries with one or two
category levels (Category > Subcategory). The straightforward way to do
this, of course, is to use database fields for Category and Subcategory
and query off of those fields.
I have a client now who is interested in what sounds to me to be an
unnecessarily complex catalog with an as of yet undefined number of
category levels at their disposal.
|
by: RottNKorpse |
last post by:
Well I am trying to make an admin section to allow my other admins of my site able to add content to my mysql database without giving them phpmyadmin access and without teaching them out to use it as well. So I am trying to make a form that they can use to fill in a few simple fields and then it create the tables in the database and then insert a row in a seperate table that is already made.
Here is how I want it to work...
Name:
Filename:...
| |
by: Phil Latio |
last post by:
Let's say I have a simple web application running with just two MySQL
tables. The tables structure is as follows:
Table: category
category_id (PK)
category_name
parent_category (FK) //references category_id in this table
Table: link
link_id (PK)
|
by: shmodi |
last post by:
Hi All,
I am new here and want to get some help for speeding up and resolving IE issue while creating tree using ajax.
My tree contains radio buttons at each level and I am getting all tree data from database. To speed up, what I am doing is to have tree in session at server side
and whenever ajax needs the tree , it sends appropriate tree key request and get the tree object from server.
My problem starts while processing huge tree....
|
by: astolpho |
last post by:
I am using a slightly outdated reference book on J2EE programming. It gives 2 methods of creating a database used in its casestudies. The first is an ANT script that gives the following output:
D:\original\CaseStudy-2-5\CaseStudy\Day02\exercise>asant database
Buildfile: build.xml
env-user:
prop-user:
set-user:
|
by: slizorn |
last post by:
hi guys,
i need to make a tree traversal algorithm that would help me search the tree..
creating a method to search a tree to find the position of node and to return its pointer value
basically i need to read in a text file... shown below
H
H,E,L
E,B,F
B,A,C
A,null,null
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |