how to Clear the values of Telerik Masked TextBox Via Jquery when users clicks on that Telerik Masked TextBox

jquery, jquery-ui, telerik, telerik-radmaskedtextbox

Solution

Try this... it will work.

<ClientEvents OnFocus="onfocus" />

JavaScript:

<script type="text/javascript">
    function onfocus(sender, args) {
        sender.clear();
    }
</script>

Problem

I am making a module in which the person's name and mobile number is saved in the database. The Telerik Masked TextBox is being used as a method to get input phone numbers. ``` $(".mainContainer").find("#salebyowner").find("input").val(""); ``` when that div gets loaded at first instance it respectively clears all the values on it. But when i click on that respective phone number's textbox, the values are then again set. I need to clear it. I have applied the following but it doesn't seems to be working. ``` $(".mainContainer").find("#salebyowner").find("#rad_sale_owner_no").click(function () { $(".mainContainer").find("#salebyowner").find("#rad_sale_owner_no").val(""); alert("its working"); }); ``` or if there is someother way by changing its properties, then that answer is also welcome.

Original source