View Full Version : Auto fit page in DHTML Window widget

08-04-2011, 05:54 PM
1) Script Title:
DHTML Window widget

2) Script URL (on DD):

3) Describe problem:
It's posible to auto fit the window widget to the content loading by ajax, I need to do this because i don't know how big or small is the page i load

08-05-2011, 12:03 AM
You could try the below modified dhtmlwindow.js file, which will resize all Ajax based DHTML windows so the content inside dictates the window's dimensions. The catch is in order for this to work, you'll need to make sure the shown content itself has explicit dimensions, at least its width. So for example, lets say external.htm is the content file you wish to show inside your Ajax window. You'd modify its contents so at least the width of the content is specified:


<div style="width:450px">
<img src="windowfiles/bird.jpg" style="float: left; margin: 0 10px 10px 0" />Birds are bipedal, warm-blooded, oviparous vertebrate animals characterized primarily by feathers, forelimbs modified as wings, and hollow bones.