By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,727 Members | 766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,727 IT Pros & Developers. It's quick & easy.

Modal Window : (Change) Size Problem

P: n/a
Hello All.
I open a window using showModalDialog function.
(window.showModalDialog('webform2.htm',null,'resiz able: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);

Thank All.
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
See if this helps

http://msdn.microsoft.com/workshop/s...fs/showModalDi
alog.htm

Regards

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

P: n/a
See if this helps

http://msdn.microsoft.com/workshop/s...fs/showModalDi
alog.htm

Regards

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.