All Products
Demos
Pricing
Blogs
Docs & Support
Search
Shopping cart
Login
Contact Us
Get A Free Trial
close mobile menu
Telerik Forums
/
UI for ASP.NET AJAX Forum
/
Window
/
Automatically Resize Parent Window
Cancel
Telerik UI for ASP.NET AJAX
Resources
Buy
Try
Feed for this thread
2 posts, 0 answers
Rahul
142 posts
Member since:
May 2009
Posted 02 Jun 2009
Link to this post
Hello Sir / madam
i have 2 form i m clicking on button open Radwindow with form in that radwindow one button it will open another Radwindow inside Radwindow ... but i want to automatically Resize the Parent window ? How to achieve ? Urgent !!!!!!!!!!!!!!!!!!!1
Thanks
Regards
Rahul M
Shinu
17764 posts
Member since:
Mar 2007
Posted 02 Jun 2009
Link to this post
Hello Rahul,
You can resize the parent RadWindow by using the
client side methods
set_width()
and
set_height()
. ASPX and JavaScript for parent radwindow is given below.
ASPX:
<
input
id
=
"Button2"
type
=
"button"
value
=
"Resize and open window"
onclick
=
"resize();"
/>
JavaScript:
<script type=
"text/javascript"
>
function
GetRadWindow()
{
var
oWindow =
null
;
if
(
window
.radWindow)
oWindow =
window
.radWindow;
else
if
(
window
.frameElement.radWindow)
oWindow =
window
.frameElement.radWindow;
return
oWindow;
}
function
resize()
{
var
radwidow = GetRadWindow();
var
oBrowserWnd = GetRadWindow().BrowserWindow;
radwidow.set_width(800);
// Resize the window
radwidow.set_height(800);
// Resize the window
radwidow.center();
oBrowserWnd.radopen(
'http://www.google.com'
,
'null'
);
}
</script>
Thanks,
Shinu.
Back to Top
Close