onclick call with params
<p>I've got a function, like this:</p>

<pre><code>menu[0].onclick = function() {
    filters.reset_all();
    clients.get();
}
</code></pre>

<p>So it's called when user clicks on the first menu element. Now I need to call it form the other place and what I've done is this:</p>

<pre><code>    if (li.onclick) { //li and menu[0] above are the same
        li.onclick.call();
    }
</code></pre>

<p>and it works well.</p>

<p>But now I need to pass some params to <code>onclick</code> function. I've tried this <code>.call(some_param);</code> but <code>arguments</code> array in <code>onclick</code> is empty.</p>

<p>What am I doing wrong?</p>

<p><strong>edit:</strong> changed into this:</p>

<pre><code>menu[0].onclick = function(arg) {
    console.log(arg);
    filters.reset_all();
    clients.get();
}
</code></pre>

<p>and</p>

<pre><code>li.onclick.call(li,param);
</code></pre>

<p>still nothing</p>
