Ok - so I'm writing this and confusingmyself.

I have a table. lib_cat_meta

that table records a unique ID, a label thats not necessarily unique, an
approval status (1 is approved), a parent value (the unique id of a parent
catagory) and a count of how many objects are in each catagory.

First I populate the top level catagories. Basically everything with null
value for parent is a top level catagory.

Query - Cat_TL (catagories top level)

SELECT lib_cat_meta.ID, lib_cat_meta.Label, lib_cat_meta.ObjCount
FROM  lib_cat_meta
WHERE (lib_cat_meta.Parent IS NULL)
And (lib_cat_meta.approved = '1')
ORDER BY lib_cat_meta.Parent

Then I'm outputting those to a table - IE you can see all the top level
catagories that return. Then I get confused. Then you should be able to
click on them, set a value to carry across to the next load of the page. IE
click on Hardware, hardware's ID is 25, so set a variable as 25 for the next
load.

Query - Cat_Cur_Lvl

SELECT lib_cat_meta.ID, lib_cat_meta.Label, lib_cat_meta.ObjCount,
lib_cat_meta.parent
FROM  lib_cat_meta
WHERE (lib_cat_meta.Parent = '#session.selected_branch#')
And (lib_cat_meta.approved = '1')
ORDER BY lib_cat_meta.Parent

So that whichever top level they've selected loads.

Whats the best way to go about it? I considered populating a form with
hidden values, and making the expand image the submit button, but that seems
inelegant.

I considered a javascript solution? Onclick set the value of a hidden form
var to the appropriate ID and submit the form... But buggered if I know how
to do that :)

Ermm.. Help :)

Cheers
Sean



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to