On Thu, Jan 22, 2015 at 4:17 PM, joulumaa <jterveh...@gmail.com> wrote:
> Hi, beginner question..... > > I need to have two listboxes A and B on web page, When user selects one > item from A it should add it in B. > > If I understand right, form A should somehow save change to database and > wake up form B to update its query. > > Where should I start in documentation? > > Hi, This isn't really a Django question, per se - it's got more to do with JavaScript on the client side. The only Django component will be a form that contains 2 ManyToManyFields. However, that just provides the way to render the initial A and B lists, and commit them when they are saved. The process of moving an item from one list to another will require JavaScript. Django doesn't provide anything to do this out of the box. There are plenty of toolkits to do this; it's up to you to investigate your preferred option. However, jQuery is one place to start. If you want to do this in a truly dynamic fashion - i.e., saving each individual list change as it happens, rather than "make a bunch of changes, and commit", you're in a whole other territory; you'll need to investigate AJAX and APIs. Yours Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJxq84_vrftMtRY%3Dg2G%2BCrtntCDWDZdPtV5-GVrAHymzmaXC2A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.