View Full Version : DHTML Modal 1.1 - windowed browser issue

08-07-2008, 07:09 PM
I have been a happy user of the dhtml modal 1.1 popup script.


However I noticed an unexpected behavior. If the dhtml popup is implemented in a browser window that is NOT maximized AND there is a horizontal scroll bar at the bottom of the page then an anomaly exists with the modality of the popup.

After the pop-up is on the screen and the background is greyed - slide the horizontal scroll bar to the right. You will see that the grey area does not extend to the full right of the content area. But rather the grey area only covers the area that was originally exposed when the modal pop-up what first displayed. Furthermore, the area that is not grey that was exposed by scrolling the browser to the right is now clickable.

Is there any way to make the modal area extend all the way to the right end of the content on a browser window that has not been maximized?

08-08-2008, 05:47 AM
Inside modal.js, try finding the below line:

this.interVeil.style.width=d.docwidth+"px" //set up veil over page

and replacing it with the code below:

this.docwidthcomplete=(d.standardbody.offsetWidth>d.standardbody.scrollWidth)? d.standardbody.offsetWidth : d.standardbody.scrollWidth
this.interVeil.style.width=this.docwidthcomplete+"px" //set up veil over page

08-08-2008, 03:35 PM
That change in the code completely fixed the problem! THANK YOU!