searchable-option-list
                                
                                
                                
                                    searchable-option-list copied to clipboard
                            
                            
                            
                        Dynamic binding to SOL, based on multiple selection
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 [email protected]