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







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”);







Can you help me?

Thanks in advance!

pyt

Hello,

Please try something like this:



            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”);



and then attach div id=“some” to window

dhxWins.window(“w3”).attachObject(“some”);

Unfortunately it doesn’t work. When i run the page the commands in

are shown under grid.
Have you any suggest?

Could you please attach completed demo?