Javascript anonymous function vs normal function
<p>What's the difference between:</p>

<pre><code>&lt;script type="text/javascript"&gt;
        $().ready(function() {
            InitialDictionary = new Array();
            LoadCurrentValues(InitialDictionary);
            $("a[id*=SomeLink]").click(function() {
                if (!CompareDictionaries(InitialDictionary)) 
                {
                    alert('Hello')
                }
            }
        )
        })
&lt;/script&gt; 
</code></pre>

<p>and</p>

<pre><code>&lt;script type="text/javascript"&gt;
    $().ready(function () {
        InitialDictionary = new Array();
        LoadCurrentValues(InitialDictionary);
        $("a[id*=SomeLink]").click(CheckValuesChanged(InitialDictionary));
    })

    function CheckValuesChanged(InitialDictionary) {
        if (!CompareDictionaries(InitialDictionary)) 
        {
            alert('Hello')
        }
    } 
&lt;/script&gt;
</code></pre>

<p>Without going into details into what I'm trying to achieve here, is there any reason why an anonymous method works fine and the call to a funtion doesn't? Shouldn't they produce the same results?</p>
