I assume your textbox is in the ContentTemplate of a RadWindow. If this is the case then it acts like any other container - you can check, for example for its parent elements, yet this is an unsafe approach for a common function - you cannot be always certain what the page's layout would be.
The approach when you use the Sys.Application.Load event to make sure the response is received would also be applicable for a regular postback, so you can leave only this function.
Alternatively, you can create two functions - one to use with AJAX and one - with your current approach for the rest of the scenarios.
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed