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
1740
defaultValue property has a blank space
posted

We wrote a generic "form is dirty" implementation on the body unload event. WebNumericEdit control has a blank space in the defaultValue property even when the control is not touched on the browser.

This check always return true in the javascript function.

if (type == "hidden" || type == "password" || type == "text" || type == "textarea" || type == "file") {
            if (element.value != element.defaultValue) {
                return true;
            }       }

How do we differentiate this control with other elements? Is there a way to set the defaultValue to empty string?

Here is my HTML for the control -  

 

 

 

<igtxt:WebNumericEdit ID="WebNumericEdit1" runat="server" HideEnterKey="true" SelectionOnFocus="CaretToEnd" DataMode="Decimal" Width="80px" Height="18px"></igtxt:WebNumericEdit>