I am using this with an HTA application I am writing, WPI, to open an information window on top of the main window. Everything is working fine, except when I click into a TEXT or TEXTAREA input field, it will not be accepted unless click somewhere other than the end. These fields are not in the dhxWindow.
If I click in the center of an existing string, it works. If I click at the end of the string to add more text, it does not work. If the text box is blank, can’t do anything. This happens with the window open or closed. All other buttons work fine.
VPWindow = new dhtmlXWindows();
VPWindow.enableAutoViewport(true);
VPWindow.setImagePath("./Common/imgs/Windows/");
VPWindow.setSkin(“standard”)
InfoWindow = VPWindow.createWindow(“InfoWindow”, 50, 50, 600, 410);
InfoWindow.setText(“Information”);
InfoWindow.attachObject(“layerinformation”); // a
Please try to use dhtmlxwindow.js from next thread
dhtmlx.com/docs/products/kb/inde … tmlxwindow
it must resolve issue with selection blocking
That fixed the above problem.
But now when I maximize the window I get an error here:
this._redrawWindow = function(win) { win.style.left = win.x + “px”; win.style.top = win.y + “px”; win.style.width = win.w + “px”; win.style.height = win.h + “px”;
Invalid argument for
win.style.width = win.x + “px”;
=============================
I also do an attachEvent(“onFocus”,SetActiveWindow);
function SetActiveWindow(win)
{
position=“main.js”;
whatfunc=“SetActiveWindow()”;
ActiveWindow=win.getText();
}
Says Objext doesn’t support this property or method. Yet your demos work fine.
Same code as posted in original message.
Unfortunately both issue can’t be reconstructed locally.
Please try to use attached js file instead of original one, if problem still occurs - please provide any kind of sample where it can be reconstructed ( you can send it directly to support@dhtmlx.com )
codebase.zip (15.2 KB)
That new code fixed the maximize issue.
But now attachObject() has no affect; just a blank gray window. attachURL() works fine.
win.getText() still has error message.
The issues can’t be reconstructed locally, both setObject and getText works as expected in local samples.
If problem still occurs for you - please provide any kind of sample where issue can be reconstructed.
If I used this code, attachObject() will not work:
var newDiv = document.createElement(“div”);
var objDiv = document.getElementById(“layergroup”);
newDiv.id=“layerabout”;
newDiv.style.position=“absolute”;
newDiv.style.display=“none”;
newDiv.style.overflow=“auto”;
newDiv.style.width=“100%”;
newDiv.style.height=“100%”;
If I use this, it works:
var newDiv = document.createElement(“div”);
var objDiv = document.getElementById(“layergroup”);
newDiv.id=“layerabout”;
newDiv.style.display=“none”;
newDiv.style.overflow=“auto”;
newDiv.style.position=“relative”; works also.
It has to do with the style position. It works fine with my program now.
I am still having problems with
VPWindow = new dhtmlXWindows();
VPWindow.enableAutoViewport(true);
VPWindow.setImagePath("./Common/imgs/Windows/imgs/");
VPWindow.setSkin(“clear_silver”);
VPWindow.attachEvent(“onFocus”,SetActiveWindow);
function SetActiveWindow(win)
{
position=“main.js”;
whatfunc=“SetActiveWindow()”;
ActiveWindow=win.getText();
}
I can’t do anything with the win variable.
VPWindow.attachEvent(“onFocus”,function(win) { ActiveWindow=win.getText(); } );
does not work either.
Could there be a conflict with one of your other modules? I am using almost all of them in my program.
Problem confirmed, the onFocus event called during window creation and window object is not fully operable in such moment, you can try to use attached js file instead of original one.
dhtmlxwindows.zip (14.7 KB)
Working better. No more error message.
But, the onFocus happens too soon. It doesn’s allow the window title to be set, so the initial win.getText() is always “Untitled dhtmlxWindow”.
If I open a second window, same thing. Focus the first window, title is returned correctly.
Getting close…
The window come in focus immideatly after creation, so it calls onFocus in same moment.
The text of header set by separate command, after win. creation, so it occurs after onFocus event - technically, it is a correct behavior.