fastselect icon indicating copy to clipboard operation
fastselect copied to clipboard

Need to dynamically change the fastselect url parameter

Open vijichandran opened this issue 9 years ago • 3 comments

Hello, I need to display the colleges based on the country. Initially i have select box to list the country and a text box to display the colleges in which the fastselect is enabled. When a user select the country, i need to pass the url with country name in the fastselect url parameter. How it can be implemented?

vijichandran avatar Jan 10 '17 12:01 vijichandran

You can change the url with this code: $('#fastselect').data('url', 'your_new_url' ).fastselect();

but i havent found the way to reload fastselect since this will only work once.

pascalvanegmond avatar Jan 11 '17 23:01 pascalvanegmond

itis not working

zdiodic avatar May 30 '18 09:05 zdiodic

I need cascading dropdown using Fastselect plugin and I got 80% of success. Below is my code $(function () { var $country = $("#Country"); $country.fastselect({ onItemSelect: function ($item, itemModel) {
var $state = $("#State");
$state.data("data-url", "../Base/GetState?countryId=" + itemModel.value); $state.removeAttr("disabled"); $state.fastselect({ onItemSelect: function ($item, itemModel) { var $city = $("#City"); $city.data("data-url", "../Base/GetCity?stateId=" + itemModel.value); $city.removeAttr("disabled");
$city.fastselect();
} });
} }); });

-My Issue Once you select Country it will state list and as per state selection, it will fill up city dropdown. Till here its working good but when trying to change country it won't reload state dropdown. Any Idea how to tackle this situation.

darshan78261992 avatar Oct 10 '18 12:10 darshan78261992