Prevent Window open until content loaded.

4 posts, 0 answers
  1. Robert
    Robert avatar
    199 posts
    Member since:
    Aug 2009

    Posted 13 Oct 2009 Link to this post

    Is it possible to prevent a window from being shown until after the content is loaded and after I set the height and width?  The problem I am having is with respect to dynamic content. So...  width=300, height=300 might work in some case but only a few. I want to eliminate the flicker of resizing the window. 

    I have tried using the AutoSize feature and after find it does not suit my need.  AutoSize will also randomly resize the window to something smaller than the content.  I also do not want the animation that comes with the AutoSize feature.

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 14 Oct 2009 Link to this post

    Hello Robert,

    You could try opening the window outside of the viewport - you could use Top and Left properties to do that. Once the OnClientPageLoad event is fired, you could move the RadWindow in the viewport by using MoveTo() or center() methods.


    Best wishes,
    Georgi Tunev
    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.
  3. Robert
    Robert avatar
    199 posts
    Member since:
    Aug 2009

    Posted 14 Oct 2009 Link to this post

    ok thats seems like an approach but I am having a problem trying to get a handle to the DIV within my RadWindow.

    I open RadWindow1 and from that window I open RadWindow2 which exists on the main page.  I need to open RadWindow2 from the main page so that RadWindow2 can exist outside the bounds of RadWindow1.

    I try to get a handle to a <div></div> within RadWindow2 per the documentation but I keep getting object does not support this property or method error.

    RadWindow1 code:

    var op = GetRadWindow().BrowserWindow.parent;
    var oWnd = op.GetRadHelpWindow()
    oWnd.add_pageLoad(OnClientLoadHlp);
    oWnd.add_close(OnClientCloseHlp);
    oWnd.setUrl("RTS_Help_Window.aspx?id="+helpid)
    oWnd.show();
    var myDiv=oWnd.get_contentFrame().contentWindow.GetDivMain();

    RadWindow2 Code within RadCodeBlock never gets here:
     

     

    function GetDivMain() {

     

     

    debugger;

     

     

    var oDiv=document.getElementById("divMain");

     

     

    return oDiv;

     

    }



  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 15 Oct 2009 Link to this post

    Hello Robert,

    Please open a support ticket and send us a small sample project that reproduces your exact setup and logic so we could get a better view over your case. Once we can examine your code in details, we would do our best to provide you with a solution.


    Kind regards,
    Georgi Tunev
    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.
Back to Top