We help IT Professionals succeed at work.

Read value of telerik radtextbox injavascript

155 Views
Last Modified: 2018-09-06
Hi,

I am trying to read the value of the radtext box. It comes out empty.

Anything wrong with this code?



var Addr1 = $find("<%= txtAddr1.ClientID %>");
addr1Text = Addr1.get_value();
alert("Addr1Text: " +  addr1Text );

 <telerik:RadTextBox ID="txtAddr1" runat="server" OnTextChanged="txtAddr1_TextChanged" AutoPostBack="false">
                </telerik:RadTextBox>

Open in new window

Comment
Watch Question

Chief Technology Ninja
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Chinmay,

txtAddr1 is part of an address control(user control which also has addr2, city state)
When the onclientselectedindexchanged event of the radcombobox is fired, i want to capture all the values.
In this scenario, i can read the values of the city and state comboboxes. I am not able to get the value of the text box.

Thanks
Chinmay PatelChief Technology Ninja
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Hi Shahjagat,

Please post complete code, if possible, otherwise it is difficult to guess. Check your Browser's console, are you getting any errors? Also did you try putting a debug point and see what you are getting in Addr1?

Regards,
Chinmay.