Struggling with advanced list select functions. Suggestions?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Kadanis
Forum Contributor
Posts: 180
Joined: Tue Jun 20, 2006 8:55 am
Location: Dorset, UK
Contact:

Struggling with advanced list select functions. Suggestions?

Post by Kadanis »

Hi all

Basically we want to have 2 list selectors on part of the site I'm working on. The first will list all the functions within the control panel section of the site, the 2nd will be empty. During user creation, the creator must be able to copy functions from the first select box to the second based on what the new user will have access to. Simple, I know and I have this working now, but...

In the access control options there are a number of parent categories with sub categories. What I really would like is that if a child is moved over, the parent is automatically moved over, if a parent is removed, all children need to be removed.

My question is, do I need to manually code all this, or is there some kind of solution out there that someone may have come across. I've been googling this, but not found anything suitable yet.

Thanks in advance for any suggestions/help
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Struggling with advanced list select functions. Suggestions?

Post by pickle »

The logic that does the moving needs to be aware of children & parents. Without knowing how your code is set up it's hard to tell if there's an easy way, but I can't imagine any setup that has this sort of thing built-in.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply