in the file some.js in webroot
$(function(){
$("#FarmStateId").change(function(){
var escolha = $(this).val();
if (escolha)
$.getJSON('/../fazenda/farms/busca/'+ escolha , function(j){
var options = '';
for (var i in j){
options += '<option value="' + i+ '">' + j[i] + '</
option>';
}
$("#FarmCityId: options").remove();
$("#FarmCityId").html(options);
});
});
});
I don't know if there is a best way to do that.
sorry about english
On 5 abr, 08:21, Ambika Kulkarni <ambikakulkarn...@gmail.com> wrote:
> Hi there,
>
> I want a drop down list and on chage another drop down lst has to be
> done.
>
> Please help me out.
>
> Thanks in advance
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
To unsubscribe, reply using "remove me" as the subject.
No comments:
Post a Comment