how do you pass a parameter to a function when it is called by reference?
<p>I've created a global variable to pass informatin to a method that is called via a method reference</p>

<pre><code>d_g.onerror=i_bm_err_fix;
</code></pre>

<p>I tried passing it the variable like this(below) but it did not work.</p>

<pre><code>d_g.onerror=i_bm_err_fix(d_g);
</code></pre>

<p>All I'm trying to do is have a generic image load if the site favicon does not.</p>

<pre><code>function i_bm_err_fix(d_g)
  {
  d_g.src='http://www.archemarks.com/favicon1.ico';
  }
</code></pre>

<p>Currently I'm using a global variable to pass this info. but this does not seem like good practice.</p>
