Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by vijayachitra on Mar 27, 2009 02:28
open dhtmlx forum
Model window does not fill the gray for the entire page

Hi,

When I set the window to Modal, it works fine but the gray background is not filled for the entire page and is only for the half of the page. When the page is scrolled down it looks odd as gray does not appear for the rest of the page. Please find attached the sample code. I went through the knowledge base and tried to set the body height and width to 100% but still does not seem to work.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
    <link rel="stylesheet" type="text/css" href="utilities/dhtmlxSuite/dhtmlxWindows/codebase/dhtmlxwindows.css">
    <link rel="stylesheet" type="text/css" href="utilities/dhtmlxSuite/dhtmlxWindows/codebase/skins/dhtmlxwindows_dhx_blue.css">
    <script src="utilities/dhtmlxSuite/dhtmlxWindows/codebase/dhtmlxwindows.js"></script>
<script src="utilities/dhtmlxSuite/dhtmlxWindows/codebase/dhtmlxcommon.js"></script>

</head>
<body style="width:100%; height:100%; margin:0px;">
<table width="600" height="1488" border="1" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</body>
<script>
var dhxWins = new dhtmlXWindows();
var win = dhxWins.createWindow();
    win.center();
    win.setDimension(500,400);
win.setText("Uploading file.....");
win.clearIcon(); // hide icon
win.denyResize(); // deny resizing
    win.centerOnScreen();
    win.setModal(true);

</script>

</html>
Answer posted by Alex (support) on Mar 27, 2009 07:57

Hello, 

The solution is to attach window viewport to the necessary container - and all windows will be visible only inside this container. 

Please, see the sample of such a vieport in the documentation: http://dhtmlx.com/docs/products/dhtmlxWindows/samples/viewports/render_as.html