I use the following code for the slider
Css and jQuery:
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script> <script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
Aspx:
<p> <label for="amount">Value:</label> <input type="text" id="amount" style="border: 0; color: #f6931f; font-weight: bold;" />% </p> <div id="slider-vertical" style="height: 15px; width:800px"></div> <script type="text/javascript"> $(function () { $("#slider-vertical").slider({ orientation: "horizantal", range: "min", min: 0, max: 100, value: 60, slide: function (event, ui) { $("#amount").val(ui.value); } }); $("#amount").val($("#slider-vertical").slider("value")); }); </script>
I am trying to set a value for a slider:
function UpdateSlider(PhaseInStatusReportVal) { $("#slider-vertical").slider("value").val(PhaseInStatusReportVal); }
I call the code above:
ClientScript.RegisterStartupScript(Me.GetType(), "updatetheslider", "UpdateSlider('" + BCOMSPackageValidationList(0).PhaseInStatusReport.ToString() + "')", True)
but it throws the above error.
Can anybody help me?
Kapil
source share