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

$find is unefined

1 Answer 263 Views
Window
This is a migrated thread and some comments may be shown as answers.
Allan
Top achievements
Rank 1
Allan asked on 30 Dec 2011, 04:32 PM
I am trying to open a radwindow that is scripted in a top base page that has frames.  I have a method on my base page called "ShowRadWindow".  This method does a $find for the radwindow, then a seturl and show.  Withing a frame page from the page, I call a method when a submit button on the page is clicked.  It in turn calls ShowRadWindow.  For some reason I am getting an error back saying that $find is undefined.  How do I get that symbol from my frame page calling the parent.ShowRadWindow?

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 04 Jan 2012, 09:06 AM
Hello Allan,

Such an error may indicate that the MS AJAX framework has not been loaded at the point you try to open the RadWindow. Please confirm that the page has fully loaded when you call this function as the AJAX scripts are the last thing to be downloaded on a page. Also make sure that the RadWindow is defined in the proper page so that it includes the needed scripts and that its EnableEmbeddedScripts property is not set to false.

I also tried this approach and things seem to be working fine with me: http://screencast.com/t/dox6c9YnPKkn. I am also attaching my test page here as a reference, so you can compare it with yours and check for any major differences that may be causing this on your end.

Please also make sure that you are using the correct ClientID of the RadWindow, especially if the case involves INmaing containers (e.g. master pages) - instead of $find("RadWindow1") use server code blocks: $find("<%=RadWindow1.ClientID %>").

Also, make sure that the frame hierarchy is correct - i.e. the frames are only one level deep, so the parent keyword will suffice. If not - you can change it to top so that you reference the topmost frame.


Kind regards,
Marin
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 now
Tags
Window
Asked by
Allan
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or