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

$find for a radnumerictextbox gives me a null

2 Answers 83 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Shweta
Top achievements
Rank 1
Shweta asked on 13 Jul 2011, 07:27 AM
HI,

I am lost.
This code gives the the right result in one function in my javascript but returns null in another.
I need to set the value of the numeric text box from javascript using set_value();
Please help!

 

 

 

var B = $find('RadNumericTextBox2');

Thanks,
SHweta

2 Answers, 1 is accepted

Sort by
0
Alexey
Top achievements
Rank 1
answered on 13 Jul 2011, 09:11 AM
Hi,

Can you provide code of the controls where $find is working and where is not?
Maybe you are using ClientIDMode=Static?

Thanks
0
Sebastian
Telerik team
answered on 13 Jul 2011, 09:22 AM
Hello Shweta,

Setting static client id for the numeric textbox is not the most appropriate choice as this will not work in scenarios with master/content pages or user controls (which are naming containers). Instead specify the client id dynamically as follows:

var B = $find('<%=RadNumericTextBox2.ClientID %>');

Best regards,
Sebastian
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Ajax
Asked by
Shweta
Top achievements
Rank 1
Answers by
Alexey
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or