$find is unefined

2 posts, 0 answers
  1. Allan
    Allan avatar
    2 posts
    Member since:
    Jun 2010

    Posted 30 Dec 2011 Link to this post

    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?

  2. Marin Bratanov
    Marin Bratanov avatar
    5929 posts

    Posted 04 Jan 2012 Link to this post

    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,
    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
Back to Top