javascript : Event execute multiple time after loading page via ajax.
<p>I have created a page which will be loaded via ajax. On this page i have created a function which will assign some function for the specified keys [I'm using jquery Hot keys].</p>

<p>Here is the function that i use to assign functions</p>

<pre><code>function setupKeys() 
{
    $.each(keyMap, function (event, listener_name){
       $(document).bind('keydown', event, listener[listener_name]);
    });
}
</code></pre>

<p>This will be executed each time when page is loaded.</p>

<p>If l load the page for the first time and press enter key the function will executed. Suppose if i load the page again via ajax with out refersing the browser and press the enter key the function executes two times. And i repeat the same the function will be executes three times.</p>

<p>How can i avoid this? keyMap is an object</p>

<pre><code>keyMap = {
'Ctrl+s':'save_data',
'return':'test_return',
'tab':'test_return'
};
</code></pre>

<p>listener = new Array();</p>

<p>Please help. </p>

<p>[sorry for the poor English]</p>

<p>Krish.</p>
