Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
WebNumericEditor client Side
posted

Hi,
Version 11.1, IE9,
I want to raise / decrease the value of the editor on clicking the buttons of the WebNumericEditor with
5 (int).
So:

 

 

 

 

 

 

 

<

 

 

ig:WebNumericEditor ID="WnDstartM" runat="server" DataMode="Int" MaxDecimalPlaces="0" StyleSetName="RubberBlack" Width="40px" MaxValue="55"  MinValue="0"
ClientEvents-KeyUp="RaiseFive">
<Buttons SpinButtonsDisplay ="OnRight"></Buttons>
</ig:WebNumericEditor

>
and a smal script:
<script id="igClientScript" type="text/javascript">
<!--
function RaiseFive() { var editor = igedit_getById("WnDstartM");
var Waarde = editor.getValue() + 5;
editor.ValueInt = Waarde;}
// -->
</script>
but no response? Perhaps wrong way to SET the value???

Friendly greeting,

 


 

 

 

Parents
  • 4315
    Offline posted

    Hi, guy(s) from onnitelenet.be.

    I see that you are using some wrong method names. The method name for getting the value is get_value(), with underscore. The corresponding method for setting the value is set_value() and you should pass the new value as a parameter. Also if for some reason igedit_getById("WnDstartM") is not finding the control, you can always use the global search method $find(). So the code that is working on my machine is the following:

    // var editor = igedit_getById("WnDstartM");

    var editor = $find("<%= this.WnDstartM.ClientID %>");

    var Waarde = editor.get_value() + 5;

    editor.set_value(Waarde);

    I hope this will help you and if you have some additional questions I will be happy to answer you.

    Best regards,

    Nikolay Alipiev

     

Reply Children