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

Retrieveing a RadWndow's position client-side

3 Answers 30 Views
Window
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 17 Sep 2008, 05:50 PM
Hi,

my applications's login screen is a RadWindow which is centered on the
screen. I want to place a line of text below that window. This works if I
place this line with "position: absolute" but if the browser window is resized,
the layout breaks.
Therefore I want to place the text dynamically on page load. How can I determine
the RadWindow's position via JavaScript? Or is there a better way to do what
I want?

Best regards,
Robert

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 18 Sep 2008, 07:06 AM
Hi Robert,

I am not sure if I understand your scenario correctly, but you can get the current position of the RadWindow by using the getWindowBounds method.

I hope this helps.

Best wishes,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Robert
Top achievements
Rank 1
answered on 18 Sep 2008, 08:49 AM
Hi Georgi,

this is exactly what I needed. Thank you for your hint. I have one mor question:
What is the best place to call the client script which positions the div element? It requires the other elements to be fully loaded.
When I call my script on "LoadComplete" I am not able to get the ClientID of the RadWindow.

Best regards,
Robert
0
Georgi Tunev
Telerik team
answered on 18 Sep 2008, 11:22 AM
Hi Robert,

Could you please send me a small sample project where I can observe the problem? I just tried getting a reference to the RadWindow's clientID in OnLoadComplete and everything is working as expected.

    protected override void OnLoadComplete(EventArgs e)  
    {  
        base.OnLoadComplete(e);  
        Label1.Text = RadWindow1.ClientID;  
    } 


Best wishes,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Robert
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Robert
Top achievements
Rank 1
Share this question
or