3 Answers, 1 is accepted
0
Hi CBARS,
Yes, this is possible and I recommend you use the following approach :
Every time when a RadWindow is opened it will positioned to the top-left corner of the browser window. For your convenience I have attached a full demo to the thread.
I hope this helps.
All the best,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Yes, this is possible and I recommend you use the following approach :
<script type="text/javascript"> |
function openRadWindow() |
{ |
var oWindow = window.radopen("http://www.telerik.com", "RadWindow1"); |
oWindow.moveTo(0, 0); |
} |
</script> |
Every time when a RadWindow is opened it will positioned to the top-left corner of the browser window. For your convenience I have attached a full demo to the thread.
I hope this helps.
All the best,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
CBARS
Top achievements
Rank 2
answered on 18 Jun 2009, 11:12 AM
Hi Fiko,
Thanks for your speedy response.
I have put the MoveWindow function in the OnClientShow event as i need server side code to execute first. So instead I used the GetRadWindow function to identify the window and the MoveWindow function to move it, however it doesn't work and i get and Object Required error. I'm sure I'm making a silly mistake, any further help would be greatly appreciated.
function GetRadWindow()
{
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow;
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
return oWindow;
}
function MoveWindow()
{
var oWindow = GetRadWindow();
oWindow.moveTo(0, 0);
}
Thanks for your speedy response.
I have put the MoveWindow function in the OnClientShow event as i need server side code to execute first. So instead I used the GetRadWindow function to identify the window and the MoveWindow function to move it, however it doesn't work and i get and Object Required error. I'm sure I'm making a silly mistake, any further help would be greatly appreciated.
function GetRadWindow()
{
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow;
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
return oWindow;
}
function MoveWindow()
{
var oWindow = GetRadWindow();
oWindow.moveTo(0, 0);
}
0
Accepted
Hi CBARS,
The GetRadWindow() function is used in order to get reference to the RadWindow object on the page that is opened in a RadWindow and contains that function's declaration. That is why, in your scenario the GetRadWndow() function returns 'null' and this is expected, because the page is not opened inside a RadWindow object. In your case you need to use the following approach :
The first passed argument to the OnClientShow handler is the caller object ( RadWindow object).
I hope this helps.
Greetings,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
The GetRadWindow() function is used in order to get reference to the RadWindow object on the page that is opened in a RadWindow and contains that function's declaration. That is why, in your scenario the GetRadWndow() function returns 'null' and this is expected, because the page is not opened inside a RadWindow object. In your case you need to use the following approach :
<script type="text/javascript"> |
function OnClientShow(oWindow, args) |
{ |
oWindow.moveTo(0, 0); |
} |
</script> |
The first passed argument to the OnClientShow handler is the caller object ( RadWindow object).
I hope this helps.
Greetings,
Fiko
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.