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

Problem with find$

3 Answers 68 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Michael Constantine
Top achievements
Rank 1
Michael Constantine asked on 30 Sep 2009, 11:23 PM
i know this is a silly question, but i have a splitter on a page and am trying to call a javascript function to scroll the splitter to the bottom on page load.

 

var splitter = $find("<%= RadSplitter1.ClientID %>");

always says splitter is null or not an an object.

What am i missing??

Thanks!

 

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 01 Oct 2009, 07:21 AM
Hi Michael,

I tried the code and I am able to get reference to RadSplitter clientside object using above code. Could you provide the version of RadControl that you are using?

Here is the documentation on how to get the client side object in RadSplitter for ASP.NET version: Basics
And here is the documentation on how to get the client side object in RadSplitter for ASP.NET AJAX version: Client-Side Basics

Are you placed the RadSplitter in any UserControl?

-Shinu.
0
Michael Constantine
Top achievements
Rank 1
answered on 01 Oct 2009, 04:04 PM
Product version is 2009.02.0826.35

I do not have the splitter in a user control.  A simple page with a splitter and a script.

 

<script type="text/javascript">

 

 

var splitter = $find("<%= RadSplitter1.ClientID %>");

 

 

alert(splitter);

 

</script>

always returns null

 

0
Tsvetie
Telerik team
answered on 02 Oct 2009, 02:42 PM
Hi Michael Constantine,
The client objects for the RadControls are created on the Sys.Application.init event. That is why, in case you want to get a reference to a RadControl client object, you can do this after the init event. For example:
<script type="text/javascript"
function pageLoad() 
    var splitter = $find("<%= RadSplitter1.ClientID %>"); 
    alert(splitter); 
</script> 

Greetings,
Tsvetie
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Splitter
Asked by
Michael Constantine
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Michael Constantine
Top achievements
Rank 1
Tsvetie
Telerik team
Share this question
or