Categories | Question details Back To List | ||
attachObject in window Hi, i use dhtmlxWindow and grid and i'd like to insert a digram in my Window. When i attach the diagram as an external page, it works great but i'd like to have my codes am best in my index site through attachObject. In this case the window is not able to display digram in window. Hier are my codes: index.html ... <script src="diagram.js"></script> ... var w3 = dhxWins.createWindow("w3",0,0,200,200); dhxWins.window("w3").button("park").hide(); w3.setText("changeHistory"); document.open(); var D=new Diagram("Dia0"); D.SetFrame(80, 50, 420, 250); D.SetBorder(10, 50, 0, 4); D.SetText("X-Skale","Y-Skale", "Titel"); D.Draw("#80FF80", "#0000FF", true); var y=500+Math.random()*400; var j=D.ScreenX(20+0.5); new Bar(j-15, D.ScreenY(y), j+15, D.ScreenY(0), "#0000FF", "test" , "#FFFFFF", "test"); document.close(); dhxWins.window("w3").attachObject("Dia0"); ... <div id="Dia0" style="width:100%;height:100%;overflow:auto;"></div> Can you help me? Thanks in advance! pyt Answer posted by Support on Feb 03, 2009 07:01 Hello, Please try something like this: <div id="some"> var D=new Diagram("Dia0"); D.SetFrame(80, 50, 420, 250); D.SetBorder(10, 50, 0, 4); D.SetText("X-Skale","Y-Skale", "Titel"); D.Draw("#80FF80", "#0000FF", true); var y=500+Math.random()*400; var j=D.ScreenX(20+0.5); new Bar(j-15, D.ScreenY(y), j+15, D.ScreenY(0), "#0000FF", "test" , "#FFFFFF", "test"); </div> and then attach div id="some" to window dhxWins.window("w3").attachObject("some"); Answer posted on Feb 04, 2009 04:28 Unfortunately it doesn't work. When i run the page the commands in <div> are shown under grid. Have you any suggest? Answer posted by Support on Feb 06, 2009 04:19 Could you please attach completed demo? |