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
100
Enable WebMaskEdit using client side scripting
posted

I have a regular asp.net radio button on the screen. When the user clicks on either of the 2 radio button options, I need to enable WebMaskEdit control and also change the input type.

I hock up the radio button with a client side function like this:

rdBtnTaxID.Attributes.Add(

"OnClick", "SSNTaxIDChange('" + TaxSSNMask.ClientID + "');");

Here is the client side function

 

 

 

 

 

 

function

 

SSNTaxIDChange(MaskControlName)

{

 

 

var maskControl = igedit_getById(MaskControlName);

 

 

//var maskControl = document.getElementById(MaskControlName);

 

 

 

if(maskControl != null)

{

 

 

//alert('found the control');

 

maskControl.setEnabled =

true;

maskControl.setInputMask =

"###########";

}

}

Based on the alert message that I have, it finds the object, but then does not do anything. Note that all this is inside a user control (ascx)

  • 100
    Verified Answer
    posted

    Nevermind, I was using Methods as properties. This worked.

    maskControl.setEnabled(true);

    maskControl.setInputMask(

    "###########");