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

[Solved] Prevent Window open until content loaded.

3 Answers 114 Views
Window
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 13 Oct 2009, 01:09 PM
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.

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 14 Oct 2009, 08:32 AM
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.
0
Robert
Top achievements
Rank 1
answered on 14 Oct 2009, 05:40 PM
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;

 

}



0
Georgi Tunev
Telerik team
answered on 15 Oct 2009, 11:07 AM
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.
Tags
Window
Asked by
Robert
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Robert
Top achievements
Rank 1
Share this question
or