Please suggest how i can disable or make webslider control of v11.2 readonly using jQuery
thanks
Manish Kumar
thanks a lot Jason. You have helped me solving my issue.
This won't work as you still need to get access to the AJAX component. That said, you should be able to get the id of each control and use that to get the control. If you modify your logic to the following then it should work:
function DisableUIOnPause(disable) { var disableBool = disable == '1'; $('[id*=txtbxAns').attr('disabled', disableBool); $('div[id*=wsdCL]').each(function (i) { var control = $find(this.id); control.set_enabled(!disableBool); }); }
Please let me know if you have any questions or concerns about this approach.
thanks Jason for your suggestion but your solution seems to be not working in my case. I am using slider inside the repeater control and on the click of the disable button i am retrieving repeater slider using down below code. after running thus code I am still not able to make the slider disabled. I still able to slide the slider. please suggest some help on this
function DisableUIOnPause(disable)
{
if(disable == '1')
$('[id*=txtbxAns]').attr('disabled',true); $('[id*=wsdCL]').each($(this).set_enabled(false));
}
else
$('[id*=txtbxAns]').attr("disabled", false);
$('[id*=wsdCL]').each($(this).set_enabled(true));
Hello Manish,
You can do this through the WebSlider's set_enabled function:
var slider = $find('<%= mySlider.ClientID %>');
slider.set_enabled(false);
Please note here that this needs to be done with standard JavaScript rather than jQuery. To get the control and be able to use the underlying clientside object model for the control you need to use $find which returns the AJAX component related to the element on the page. If you were to use a jQuery selector you would only be able to select the DOM element for the control.
Please let me know if you have any further questions or concerns about this matter.