basic javascript CRUD functionality

S

shahbazc

Hi,
I would like to have a generic container (currently a div, perhaps an
UL later), this container will contain a number of elements. Certain
kinds of elements can themselves be containers which will container
their own elements...and so on. (imagine a list of courses you have
signed up for, you should be able to add a new course, remove an
existing course ... or imagine a database table which may or may not
contain data, but you should be add new records or delete existing
ones).

I would like each container to be able to add more elements to itself
(based on some model element which it will clone). Each element should
be able to 'delete' itself from its container.

Containers should know which model elements to clone. They should be
flexible enough that later other functionality may be added such as:
the ability to sort the elements (by drag&drop or with a single click),
the ability to be 'filtered,' etc. The html elements should be well
designed (for example, each container will need to have its 'header'
seperate from the body which contains the elements).

I just spent more than a few hours working on this problem (I was using
even:Selectors and prototype libraries). I just can't get a simple
solution to work, I'm not a javascript programmers so I couldn't even
decipher some of the browser errors.

Does any one know of good examples of such functionality? Perhaps
pointers to some code? The idea is simple enough, I don't want to
spend any more time coding this thing, hopefully there is something out
there I can use (or adapt).

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,079
Latest member
ElidaWarin

Latest Threads

Top