4

I'm so confused as to what $find from Microsoft Ajax actually is. Does it just return a control in a similar manner that the $ operator from jquery or javascript's own getElementById do?

If I do

$find('someControlId')

Will I get the same object back from jquery's

$('#someControlId')

or Javascript

getElementById('someControlId')

The reason I ask is because when I use $find on the ClientId of some Telerik controls, the object returned seems to have a type.

So is this just another instance of the wheel being reinvented or does it actually do something else?

Matt
  • 25,943
  • 66
  • 198
  • 303

1 Answers1

7

I was able to find the following information via a quick Google search:

Why should you opt for $find instead of $get? The $get function is shorthand for document.getElementById. As such, it can only look for DOM elements. The $find function stands for Sys.Application.findComponent and applies to any component of the Microsoft AJAX Library that has been programmatically created.

From MSDN: http://msdn.microsoft.com/en-us/magazine/cc135984.aspx

For further reading, look at the Sys.Applicationl.findComponent doco.

nnnnnn
  • 147,572
  • 30
  • 200
  • 241