Open tapan8 opened 6 years ago
Hi,
How can we dynamically bind SOL while getting the parameters values from the another SOL.
Which event should be called and where in jscript, while performing the ajax call?
Can we retain the selected values in the second SOL while appending/refreshing the SOL.
example: Need to bind the first SOL with Course and then bind the second SOL with subjects for the selected courses.
SOL.js // Refered https://github.com/pbauerochse/searchable-option-list/issues/51 $.fn.searchableOptionList = function (options) { var result = []; this.each(function () { var $this = $(this), $alreadyInitializedSol = $this.data(SearchableOptionList.prototype.DATA_KEY); if ($alreadyInitializedSol) { //result.push($alreadyInitializedSol); $alreadyInitializedSol.$container.html(''); var newSol = new SearchableOptionList($this, options); result.push(newSol); setTimeout(function () { newSol.init(); }, 0); } else { var newSol = new SearchableOptionList($this, options); result.push(newSol);
setTimeout(function() { newSol.init(); }, 0); } }); if (result.length === 1) { return result[0]; } return result; };
Thanks Tapan tapan@skytesters.com
Hi,
How can we dynamically bind SOL while getting the parameters values from the another SOL.
Which event should be called and where in jscript, while performing the ajax call?
Can we retain the selected values in the second SOL while appending/refreshing the SOL.
example: Need to bind the first SOL with Course and then bind the second SOL with subjects for the selected courses.
SOL.js // Refered https://github.com/pbauerochse/searchable-option-list/issues/51 $.fn.searchableOptionList = function (options) { var result = []; this.each(function () { var $this = $(this), $alreadyInitializedSol = $this.data(SearchableOptionList.prototype.DATA_KEY); if ($alreadyInitializedSol) { //result.push($alreadyInitializedSol); $alreadyInitializedSol.$container.html(''); var newSol = new SearchableOptionList($this, options);
result.push(newSol);
setTimeout(function () { newSol.init(); }, 0); } else { var newSol = new SearchableOptionList($this, options); result.push(newSol);
Thanks Tapan tapan@skytesters.com