DhtmlX window

How to create a window by clicking on the link? Thanks

Please I need help, I trying to attach a form in a window but my problem is the next, when I click on the bottom bar I call a function called doOnLoad_win() this function show me the windows whit the form inside but when I close the windows and try to open the window again this show me the same windows but the form is not inside.

someone could help me please??? if you want see the error please go to: zapatofino.com/.mv/vista_ejecutivo.php and click on the buttom bar “Gestion de Informes”

regard,

How to create a window by clicking on the link?

link

try to open the window again this show me the same windows but the form is not inside.

When window is closed, it is removed as well as its content. You may hide/show a window:

win.attachEvent(“onClose”,function(){
win.hide();
})

To open it - win.show();

Hi,Alexandra, I also encounter the same question.
I do as you said, it works normally in IE8 , but in FF5, it doesn’t work,


<a href="#">
          <img src="../../images/products/an01_2.jpg" width="98" height="18" border="0" onclick="openPlatform()"/>
</a>

var dhxWins;
var platformWin;
function openPlatform(productName){
	if(platformWin){
		platformWin.show();
		return ;
	}
	dhxWins = new dhtmlXWindows();
	dhxWins.enableAutoViewport(false);
	//dhxWins.attachViewportTo("winVP");
	dhxWins.setViewport(0, 0, document.body.scrollWidth, document.body.scrollHeight);
    dhxWins.vp.style.border = "#909090 0px solid";
	dhxWins.setImagePath("../css/dhtmlx/imgs/");
	platformWin = dhxWins.createWindow("platformWin",200,20,750,550);
	platformWin.setText("Platform And Product Bind");
	platformWin.attachObject("obj");//obj is a div
	platformWin.attachEvent("onClose",hidePlatformWin);
       }

function hidePlatformWin(){
	//alert("hidePlatformWin");
	platformWin.hide();
	return false;
}

in FF5, after I click the “close” button to hide the platformWin window, I can’t envn click the img any more ,the cursor style now is not “pointer”,but “default”,and the entire page’s buttons can’t be clicked neither. So what’s the problem ? can you give me some suggestion?
my english is poor, wish you can understand what I am saying.
regard.
ps:the version of dhtmlxwindow I use is 3.0.

Hi,

If a viewport may contain some other clickable content except a window, setViewport should not be used. This method creates a container that occupies the defined area and covers other content. Try to use attachViewportTo instead of it.

ok, thanks.
I’ll try it