Hi All,
I am using two thumps slider. I want to get both thump value at client side.... now i get single thump value from this code.
function WrpRefresh(slider, args) { var slider=document.getElementById('wpCmsRating'); alert(args.get_newValue());
}
Please Help me
Hi All I got answer for my query......
function WrpRefresh(slider, args) { var slider=document.getElementById('wpCmsRating'); if (args.get_isSecondary()==false) { var hdn1=document.getElementById('<%= cmsValue.clientID %>') hdn1.value= args.get_newValue(); } else { var hdn2=document.getElementById('<%= cmsSecValue.clientID %>') hdn2.value= args.get_newValue(); } var warp = ig$('wrpFilter'); if(warp) warp.refresh(); }
Hi Sandara,
These codes look confusing to me. If you process ValueChanged event, then you may use get_isSecondary() member to check which value was modified. If you need external check, then you may use get_value() and get_secondaryValue() properties of slider. Below is example:
<script type="text/javascript">function sliderValueChange(slider, evtArgs){ var value = evtArgs.get_newValue(); var str = 'From evtArgs:<br />' + (evtArgs.get_isSecondary() ? 'Secondary' : 'Main') + ' new value='; str += value; str += '<br />From slider:<br />main=' + slider.get_value() + '<br />secondary:' + slider.get_secondaryValue(); $get('span1').innerHTML = str;}function showValues(){ var slider = $find('<%=WebSlider1.ClientID%>'); if(!slider) return; var value1 = slider.get_value(); var value2 = slider.get_secondaryValue(); $get('span1').innerHTML = 'Value1:' + value1 + '<br />Value2:' + value2;}</script>
<ig:WebSlider ID="WebSlider1" runat="server" EnableSecondaryValue="true"> <ClientEvents ValueChanged="sliderValueChange" /> </ig:WebSlider> <input type="button" value="showValues" onclick="showValues()" /> <br /> <span id="span1"></span>