var div = document.createElement('div');
            div.id = 'window';

        var div2 = document.createElement('div');
            div2.id = 'windowhead';

        var span1 = document.createElement('span');
            span1.id = 'name';

        var div3 = document.createElement('div');
            div3.id = ('close');


Can someone tell me why chorme console is giving me this error :
Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.

Recommended Answers

All 2 Replies

Member Avatar

why is div3 a string on line 14?

ok done but code isn't working how i want, here is my code it should a little bit work like this.
problem: i want to click someone's name, and his/her name should appear in windowhead
i am trying to create facebook chatwindow type

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.