Re: Two dependent select tags with data from DB (ajax?) - please help:)

2008-02-06 Thread Dardo Sordi Bogado
You have to fill the dependent select options when generating the form and set the default based on what the user submits. HTH, - Dardo Sordi. On Feb 6, 2008 11:10 AM, Anna P <[EMAIL PROTECTED]> wrote: > > Thank you both for help! Finally, I decided to use tutorial from > devmoz.com . > It works

Re: Two dependent select tags with data from DB (ajax?) - please help:)

2008-02-06 Thread Anna P
Thank you both for help! Finally, I decided to use tutorial from devmoz.com . It works, but I have one problem. I use dependent selects in registration form. Fields 'city_id' (first select) and 'district_id' (second select) must be selected by user - both of them are validated in form. The problem

Re: Two dependent select tags with data from DB (ajax?) - please help:)

2008-02-01 Thread [EMAIL PROTECTED]
What you're looking for is a little javascript. I would recommend creating an action in the districts controller to dump out some json based on the city, or even some html that you can just dump inside the select control. There are assorted articles / blogs around the place already on getting cake

Re: Two dependent select tags with data from DB (ajax?) - please help:)

2008-02-01 Thread Dardo Sordi Bogado
The mythical http://www.devmoz.com/blog/2007/04/04/cakephp-update-a-select-box-using-ajax/ seems exactly what you need. On Feb 1, 2008 9:47 AM, Anna P <[EMAIL PROTECTED]> wrote: > > Hello! > I'm wondering if anyone has any simple script or knows good tutorial > about two dependent select tags. >

Two dependent select tags with data from DB (ajax?) - please help:)

2008-02-01 Thread Anna P
Hello! I'm wondering if anyone has any simple script or knows good tutorial about two dependent select tags. I use and understand a little of JS, but AJAX is too much for me. I just need this one functionality from AJAX - I have two tables: cities (id,name) and districts(id,city_id,name) I want t