Passing parameters to function inside object
<p>I first obtain an element:</p>

<pre><code>var i=document.getElementsByTagName("fieldset");
</code></pre>

<p>Then I create a new object:  </p>

<pre><code>var a=new Fieldset(i[0]);
</code></pre>

<p>The function prototype is this:  </p>

<pre><code>slideDown: function() {  
    alert("here");  
} 
</code></pre>

<p>The constructor function is this:  </p>

<pre><code>function Fieldset(fieldset){  
    this.fieldset=fieldset;
    this.fieldset.addEventListener("click",this.slideDown(this.fieldset),false);  
}; 
</code></pre>

<p>The problem is that the <code>slideDown</code> function is called immediately when the new object is created and the listener is not attached to the element. </p>

<p>I've done the code with and without the <code>this</code> in front of fieldset in the constructor for the listener to no avail. I just don't know where I'm fumbling this. </p>
