NoUISlider retrieving and populating values from code behind
I am using a NoUISlider in asp.net and want to know how to retrieve the values for the slider. It is a multi-slider, so needs to return the left and right sides.
From what I've determined by reading, I will attach a javascript method to the save button.
It appears something in there is wrong. I added the code to the top of my update function and put an alert after the line and it never gets hit. So looking at the console, I get these errors;
Uncaught TypeError: Cannot set property 'value' of null at Object.<anonymous> (TeamSearch.aspx:3336) at nouislider.min.js?v=19.12.09a:2 at Array.forEach (<anonymous>) at nouislider.min.js?v=19.12.09a:2 at Array.forEach (<anonymous>) at J (nouislider.min.js?v=19.12.09a:2) at nouislider.min.js?v=19.12.09a:2 at Array.forEach (<anonymous>) at Object.$ [as on] (nouislider.min.js?v=19.12.09a:2)
slider.noUiSlider.on('update', function (values, handle) { document.getElementById("hdnSlider" + (handle * 1 + 1)).value = values[handle]; // add this new line of code
Open in new window
My code looks like this:
Open in new window