Sep 05, 2015, 11:11 AM
[CLOSED] Numberfield / strange behavior
Hello
I just stumbled upon this - for me - strange behavior when I was debugging a change handler of a numberfield. On a change I just wanted to get the actual value in a simple alert box:
Is that standard behavior? I expected to get per change from me a single alert box with the actual number. Or if it somehow gets another change from ext.net/ext.js at least another alert box but with the same number...
Thanks for clearing up my confusion ;)
best regards
I just stumbled upon this - for me - strange behavior when I was debugging a change handler of a numberfield. On a change I just wanted to get the actual value in a simple alert box:
<%@ Page Language="C#" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
}
}
</script>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Test Case</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
</head>
<body>
<form id="form" runat="server">
<ext:ResourceManager runat="server" />
<ext:NumberField runat="server" MinValue="0">
<Listeners>
<Change Handler="alert(this.getValue());" />
</Listeners>
</ext:NumberField>
</form>
</body>
</html>
In my browser (Chrome) the numberfield starts counting up after I close the alert box... going into an endless loop.Is that standard behavior? I expected to get per change from me a single alert box with the actual number. Or if it somehow gets another change from ext.net/ext.js at least another alert box but with the same number...
Thanks for clearing up my confusion ;)
best regards
Last edited by Daniil; Sep 08, 2015 at 7:00 PM.
Reason: [CLOSED]