Search the Community
Showing results for tags 'window.showmodaldialog'.
I came across a very odd issue in a project and hope someone here would have some insight into WHY this is happening... Have googled for days and can't find this issue anywhere, but I find it hard to believe no one has come across it before... We have a webpage (asp) which can result in a dynamic length, and we need to find out what the length of any particular presentation of this page is. Normally, this would be very simple by using the onload body.scrollHeight value. In fact, when the page is loaded in a pop-up using window.open, the value of the scrollHeight is accurate. If we print the page, we can convert to mm using the formula sH / 96 *254 adjusting for a 96dpi resolution and 254mm/inch. The value in this formula is spot on every single time, accurate to within 1mm. BUT... when the exact same page is loaded using the window.showModalDialog method, the scrollHeight values reported are different - and not in any mathematically consistent way. It is the same page and should have the same body.scrollHeight onload!! Here are three examples of actual measured page length compared to the loading method and resulting scrollHeight: measurement sH .open method sH .showModal Dialog method 952mm 360 px 344 px 1302mm 490 px 493 px 1682mm 661 px 637 px BOTH methods are being called without any menus, scroll, or other adornment. The browser is IE in all cases, with the same printer for measured output of course. The ONLY difference in the reported values is coming from the method being used to load the page. Needless to say, this is driving me nuts :-). Anyone have any ideas??? Thanks!