This is a migrated thread and some comments may be shown as answers.

Accessing the value of RadMaskedTextBox using javascript or JQuery

1 Answer 200 Views
Input
This is a migrated thread and some comments may be shown as answers.
VIJAY
Top achievements
Rank 1
VIJAY asked on 25 Jul 2012, 09:43 AM
We have RadMaskedTextBox control and we are setting the PromptChar and Mask propery of RadMaskedTextBox  as PromptChar="_" and Mask="###-###-####". 
We are accessing the value of RadMaskedTextBox through the javascript like the following:


$("#<%= rmtbPhone.ClientID %>_text").val()


When there is no value in RadMaskedTextBox
For DLL version: 2011.2.816.40, it is giving value as Empty("")
For DLL version: 2012.2.724.40, it is giving value as "___-___-____" instead of Empty("") 

How to get the actual value when using new DLL through Javascript or JQuery?

Thanks in advance,
Ajit

1 Answer, 1 is accepted

Sort by
0
Jayesh Goyani
Top achievements
Rank 2
answered on 27 Jul 2012, 01:35 PM
Hello,

<telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server" SelectionOnFocus="SelectAll"
           Label="IP address: " PromptChar="_" Width="300px" Mask="<0..255>.<0..255>.<0..255>.<0..255>">
       </telerik:RadMaskedTextBox>
function ClientClicktc() {
               var RadMaskedTextBox1 = $find("<%= RadMaskedTextBox1.ClientID %>");
               RadMaskedTextBox1.get_textBoxValue(); //123.123.123.123
               RadMaskedTextBox1.get_value(); // 123123123213
               }


Thanks,
Jayesh Goyani
Tags
Input
Asked by
VIJAY
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
Share this question
or