PDA

View Full Version : How to Resize DHTML Window to Maximum?



EDACD
10-23-2007, 05:12 PM
1) Script Title: DHTML Window widget (v1.03)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/

3) Describe problem: When the DHTML window opens, I would like it to automatically fit whatever the maximum available screen space is (obviously excluding browser menu, toolbars, etc.). Can this be done? If so, can someone please tell me how to do this? Thanks.

ddadmin
10-24-2007, 09:35 AM
After the DHTML window has been opened, try calling the methods moveTo() and setSize() as follows:


googlewin.moveTo(0,0)
googlewin.setSize(dhtmlwindow.docwidth-6, dhtmlwindow.docheight-40)

Where "googlewin" is the unique identifier variable you used when opening the window. You may need to adjust "6" and "40" slightly though to get the exact dimensions of the viewable browser window.