HI,
How to develop dependent drop down . I stuck in back-bone js that how i can get value of drop down.
and according to that i want populate another drop down.
Thank you
HI,
How to develop dependent drop down . I stuck in back-bone js that how i can get value of drop down.
and according to that i want populate another drop down.
Thank you
Hi Shiv Gawande
This post may help you.
If you want to do it from js file then do to so;
create-actions.js file
under initialize: function()
After this._super("initialize", [options]);
this.events['change input[name=your-fieldname]'] = 'getOptValue';
Then under getOptValue function :
getOptValue: function (elem) { var firstDropValue = this.model.get('firstDropFieldName'); $.ajax({ type: "POST", data: {firstdpvalue: firstDropValue}, url: 'get_secondDrop_list.php', // In this file get the value of first dropdown based on that get second dropdown values and return data in json dataType: 'json', success: function(json) { var $el = $("#SecondDropFieldID"); $el.empty(); $el.append($("<option></option>").attr("value", '').text('Please Select')); $.each(json, function(value, key) { $el.append($("<option></option>").attr("value", value).text(key)); }); } }); }
Hope this Helps
Best Regards
S Ramana Raju
this work on CE ? And where I can create my Js file
I Soo newbie on this! but I have not choice.
Jesus, no above is regarding Version 7. The principals of what is doing could work in jQuery.
Thanks Michael!, well
Thanks Michael!, well