S
Saeed Sedighian
I open a window using showModalDialog function.
(window.showModalDialog('webform2.htm',null,'resizable:yes'))
In modal window after page loaded i want to change size of window
using
window.resizeTo(growWidth,growHeight) .
but this not works.
If page open with window.open anything works good.
I don't know size of my pages.I used below JavaScript to dynamically
change size of window to appropriate size :
growHeight = document.body.scrollHeight - document.body.clientHeight;
if (growHeight > 0)
growHeight = Math.min(screen.availHeight,Math.max(document.body.offsetHeight,document.body.scrollHeight)+60);
else
growHeight = document.body.offsetHeight;
growWidth = document.body.scrollWidth - document.body.clientWidth;
if (growWidth > 0)
growWidth = Math.min(screen.availWidth,Math.max(document.body.offsetWidth,document.body.scrollWidth)+30);
else
growWidth = document.body.offsetWidth;
window.resizeTo(growWidth,growHeight);
(window.showModalDialog('webform2.htm',null,'resizable:yes'))
In modal window after page loaded i want to change size of window
using
window.resizeTo(growWidth,growHeight) .
but this not works.
If page open with window.open anything works good.
I don't know size of my pages.I used below JavaScript to dynamically
change size of window to appropriate size :
growHeight = document.body.scrollHeight - document.body.clientHeight;
if (growHeight > 0)
growHeight = Math.min(screen.availHeight,Math.max(document.body.offsetHeight,document.body.scrollHeight)+60);
else
growHeight = document.body.offsetHeight;
growWidth = document.body.scrollWidth - document.body.clientWidth;
if (growWidth > 0)
growWidth = Math.min(screen.availWidth,Math.max(document.body.offsetWidth,document.body.scrollWidth)+30);
else
growWidth = document.body.offsetWidth;
window.resizeTo(growWidth,growHeight);