Hi,
I do not manage to solve a problem with an inner focus in dhtmlx window.
I made a fonctionnne with attachobj, i want to set focus in a textarea in the object (div).
My code is :
[code]
function openInFullText(obj,txtorigin,txtnew) {
if (!dhxWins0) dhxWins0 = new dhtmlXWindows();
if (!dhxWins0.window(“w0”)) {
dhxWins0.enableAutoViewport(false);
dhxWins0.setSkin(“dhx_web”);
dhxWins0.attachViewportTo(“winVP”);
dhxWins0.setImagePath(“tools/dhtmlxwindows/codebase/imgs/”);
var w0 = dhxWins0.createWindow(“w0”, 0, 0, 900, 700);
w0.setModal(true);
w0.setText(" ");
w0.center();
w0.clearIcon();
w0.denyResize();
w0.button(“minmax1”).hide();
w0.button(“park”).hide();
w0.denyMove();
w0.denyPark();
w0.attachEvent("onClose", function(win){
if (win.getId() == "w0") {
win.detachObject(obj);
document.getElementById(txtnew).style.display="none";
win.setModal(false);
win.hide();
}
});
} else {
var w0 = dhxWins0.window(“w0”);
w0.setModal(true);
w0.show();
}
w0.attachObject(obj);
document.getElementById(txtnew).value=document.getElementById(txtorigin).value;
document.getElementById(txtnew).style.display=“block”;
document.getElementById('TXTDESCRIPTION').focus();
};[/code]
I call it like this for exemple :
onClick="openInFullText('divdescription','O_CALL.F_DESCRIPTION','TXTDESCRIPTION');"
And this is my div called in the window :
[code]
With this, when window show, focus is behind the window but visible (example in attach).
I tried bringtotop issu, tried to make “click()” to set focus, etc. But it doesn’t work.
And i have a second probleme, in my textarea, i can’t make selections with cursor on IE8. I can make a ctrl+A but just a selection don do anything.
I hope you can help me…
Thank you!!!
(for info, i work with dhtmlx suite pro v2.6)