PopUp does not open

Hello

I wanted to place a PopUp into a Grid Cell when clicking into this cell. I never before worked with PopUp function and don’t understand why my code desn’t work. Maybe there is a problem because PopUp is a component of the Suite ?

Here i made a little test file:

<!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>Test</title>
      <link href="../dhtmlx/Popup/skins/dhtmlxpopup_dhx_skyblue.css" rel="stylesheet" type="text/css">
      <link href="../dhtmlx/Grid/codebase/skins/dhtmlxgrid_dhx_blue.css" rel="stylesheet" type="text/css">
        
		<script src="../dhtmlx/Popup/dhtmlxpopup.js"></script>
		<script src="../dhtmlx/Grid/codebase/dhtmlxcommon.js"></script>
      <script src="../dhtmlx/Grid/codebase/dhtmlxgrid.js"></script>        
      <script src="../dhtmlx/Grid/codebase/dhtmlxgridcell.js"></script>
	</head>

	<body>
        <div id="gridbox" style="height:63px;width:180px"></div>
        
        <script type="text/javascript">
			
		  // GRID
		  // ----
		  var myGrid = new dhtmlXGridObject('gridbox');
		  myGrid.setImagePath("../dhtmlx/Grid/codebase/imgs/");
		  myGrid.setHeader("A,B,C");
		  myGrid.setInitWidths("60,60,60");
		  myGrid.setColAlign("center,center,center");
		  myGrid.setColTypes("ro,ro,ro");
		  myGrid.setColSorting("str,str,str");
		  myGrid.enableTooltips("false,false,false");
		  myGrid.attachEvent("onRowCreated", function(id,rObj,rXml){
			  myGrid.setCellTextStyle(id,0,"color:#900;font-weight:bold;cursor:pointer");
		  });
		  myGrid.attachEvent("onRowSelect", function(id,ind){
			  switch (ind) {
				  case 0: myPopUp.show(20,20,200,300); break;
			  }
		  });
		  myGrid.setSkin("dhx_blue");
	     myGrid.init();
			
		  myGrid.addRow('1',['Test A','Test B','Test C']);
		  myGrid.addRow('2',['Test D','Test E','Test F']);
		  myGrid.addRow('3',['Test G','Test H','Test I']);
			
		  // POPUP
		  // -----			
		  var myPopUp = new dhtmlXPopup();
		  myPopUp.attachHTML("This is a Test");
		</script>
	</body>
</html>

Would be really great if anybody could help me with this.

Thank you

Your code is mostly correct, here is working snippet snippet.dhtmlx.com/b7fdd610b

Hello Stanislav and thynk you for reply.

But in my version happens nothing. Maybe there is a problem because you included “dhtmlx.js” and “dhtmlx.css” and i included the PupUp order from the downloaded suite? In my suite i doesn’t found an order “PopUp” so i think it’s integrated only in dhtmlx.js?

Best regards

It’s defintely something about version conflict because if i include a link to the dhtmlx.js / dhtmlx.css it works fine. But i don’t want to include the whole dhtmlx Package because of using the PopUp. Is there a standalone Version ?

Thank you

Using the standalone sources files your code also works well.
Could you please, clarify what version of the dhtmlx you are using.
Also, please, make sure that you are your sources of the popup and grid are from the same version.
If the problem still occurs for you please, provide a complete demo, where the issue can be reconstructed.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/tutorials__auxi … pport.html