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 to do nice json.

The object you'll be wanting in your onchange (for the cities select)
is Ajax.request.

Cake uses prototype for its own Ajax (eg in AjaxHelper stuff) so you
might as well stick with that. Don't forget to download it and include
it with $javascript->link.

If all that's a bit much, check out the Ajax Helper's observe field,
which will allow you to specify the dom id of the district select
control as the update source, and just have your ajax action dump out
all the option tags to be included in the select. The slight problem
with this is that it's time based rather than event based so would be
a somewhat heavy handed solution.

Hope that gives you a few pointers.

Simon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to