connecting elements
<pre><code>&lt;script&gt;
document.getElementsByClassName("student")[0].onclick = addStudent("new element",text here ",document.getElementsByClassName("Class")[0]);
function addStudent(name,text,hendle)
{
var div=document.createElement("div");
var dt=document.createElement("dt");
var strong=document.createElement("strong").innerHTML = name;
var dd=document.createElement("dd").innerHTML = text;
dt.appendChild(strong);
div.appendChild(dt);
div.appendChild(dd);

div.setAttribute("class","student");
hendle.appendChild(div);
}
&lt;/script&gt;`
</code></pre>

<p>---> when i run the script i get an error on firebug :</p>

<pre><code>NS_ERROR_XPC_BAD_CONVERT_JS: Could not convert JavaScript argument arg 0         [nsIDOMHTMLElement.appendChild]
[Break On This Error]   
</code></pre>

<p>dt.appendChild(strong);</p>

<p>---> and also the this script don't work..the script position is in the end of the page.
how to fix it? (i'm only starting to learn javascript)</p>
