Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Luke Campbell on Feb 23, 2009 01:19
open dhtmlx forum
dhtmlxwindows -- window buttons in wrong place.

Hello.

I've the following code to open a dhtmlxWindow, attach a grid and a div. It works fine in firefox, but, in IE6, the close, minimise and maximise buttons are NOT aligned right on the window....

<script src="dhtmlx/dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
<script src="dhtmlx/dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script src="dhtmlx/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
<script src="dhtmlx/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js"></script>
<script src="dhtmlx/dhtmlxDataProcessor/codebase/dhtmlxgrid_srnd.js"></script>
<script src="dhtmlx/dhtmlxWindows/codebase/dhtmlxcommon.js"></script>
<script src="dhtmlx/dhtmlxWindows/codebase/dhtmlxwindows.js"></script>
<script src="dhtmlx/dhtmlxWindows/codebase/skins/dhtmlxwindows_web.css"></script>

<script language="JavaScript" type="text/javascript">
var windowArray = new Object();
var statusBars = new Object();
var currentWindow = 0;

// Initialise the grid, and use the data processor part of it too.
function doInitGrid(theURL, selectedID){
    currentWindow++;
    var newID = "mywindow"+selectedID;

    var dhxWins= new dhtmlXWindows();
    var needNewWindow = true;
    if(windowArray[selectedID]) {
        try {
            if(windowArray[selectedID].isHidden()) {
                windowArray[selectedID].show();
                needNewWindow = false;
            }
        }
        catch(e) {

        }
    }

    if(needNewWindow) {
        windowArray[selectedID] = dhxWins.createWindow( newID, 200, 230, 500, 300);
    }
    
    win = windowArray[selectedID];
    
    var theText = "Properties";
    if(objectNames[selectedID]) {
        theText += ":"+objectNames[selectedID];
    }
    
    win.setText(theText);
    
    newDiv = document.createElement("div");
    addDiv = document.createElement("div");
    removeDiv = document.createElement("div");
    clearDiv = document.createElement("div");
    errorDiv = document.createElement("div");

    addDiv.innerHTML = '<a href="JavaScript: addRow();"><img src="images/properties/add.gif" border="0" alt="add" id="addImg" /></a>';
    removeDiv.innerHTML = '<a href="JavaScript: removeRow();"><img src="images/properties/remove.gif" border="0" alt="remove" id="removeImg" /></a>';

    addDiv.className = "floatLeft";
    removeDiv.className = "floatLeft";
    clearDiv.className = "clear";
    errorDiv.className = "errortext";
    
    newDiv.appendChild(addDiv);
    newDiv.appendChild(removeDiv);
    newDiv.appendChild(clearDiv);
    newDiv.appendChild(errorDiv);
    
    // create a mygrid container to the window
    mygrid = win.attachGrid('mygrid_container');
    win.appendObject(newDiv, true);

    if(needNewWindow) {    
        win.center();
    }
    statusBars[selectedID] = win.attachStatusBar();

    win.attachEvent("onFocus", "doFocus");
    
    
    mygrid.setImagePath("dhtmlx/dhtmlxGrid/codebase/imgs/");
    
    mygrid.enableAutoHeight(true);
    mygrid.setSkin("light");
    
    mygrid.init();
    // showing stick button
     win.progressOn();    
     mygrid.loadXML(theURL);
    
    
     mygrid.attachEvent("onContentLoaded", function(win){
     win.progressOff();
     });
     myDataProcessor = new dataProcessor("ajaxPropertiesProcess.jsp");
    
     myDataProcessor.defineAction("error",errorHandler);
     myDataProcessor.setOnAfterUpdate(function(){
     showMessage("The item was updated.")
     try {
         if (dp.getSyncState())
             showMessage("all rows updated")
     }
     catch(e) {

     }
     });
     myDataProcessor.init(mygrid);
    
    
     if(!(isPinned)) {
         timeoutID = setTimeout("closeContainer()", 55000);
     }

}

</script>

Any help that you could give would be much appreciated. Thanks in Advance.
Answer posted by Support on Feb 23, 2009 06:35
Hello,

Could you please provide direct link to view the issue?
Answer posted on Feb 23, 2009 07:49
Please see the attached picture. It's not possible at this time to give you access to this URL, I'm afraid.....
Attachments (1)
Answer posted by Support on Feb 23, 2009 08:37
Try to attach
<script src="dhtmlx/dhtmlxWindows/codebase/skins/dhtmlxwindows_dhx_blue.css"></script>
and add
<script src="dhtmlx/dhtmlxWindows/codebase/dhtmlxwindows.css"></script>
instead of
<script src="dhtmlx/dhtmlxWindows/codebase/skins/dhtmlxwindows_web.css"></script>
cause window have dhx_blue sking on image.

You can send link directly to support@dhtmlx.com not sharing this in public place.