Javascript - how does this button fires something?
<p>Javascript is not my speciality. </p>

<p>I have a page that contains an image. This image, when clicked, fires an Ajax code, that shows a floating box. Analyzing the page code, I don't see how this button can fire the code. </p>

<p>The button is declared like this:</p>

<pre><code>&lt;div class="leaderboard-text"&gt;
  &lt;span id="addon-add-language-button"&gt;
    &lt;image class="ajaxListAddButtonEnabled" listId="localizationList"
           src="/itc/images/blue-add-language-button.png" /&gt;
    &lt;image class="ajaxListAddButtonDisabled" listId="localizationList"
           style="display:none;" 
           src="/itc/images/blue-add-language-button-disabled.png" /&gt;
  &lt;/span&gt;
&lt;/div&gt;
</code></pre>

<p>just after this code, I see this var being declared:</p>

<pre><code>&lt;script language = "Javascript"&gt;
    var createList_localizationList = function() {
        var reorderEnabled = false;
        var preventLastRowDeletion = false;
        var searchEnabled = false;
        var list = new LCAjaxList();
        list.initialize():
    }
    document.observe("dom:loaded", createList_localizationList);
&lt;/script&gt;
</code></pre>

<p>As far as I see, the image is firing somehow this javascript, but how can the button do that if there's no "onclick" or href reference tied to it? Where is the line that tells which method should run when the image is clicked?</p>

<p>What should I look on the code to get a clue how this button works?</p>

<p>What I need is to fire the method used by this button using javascript. </p>

<p>any clues?</p>

<p>================</p>

<p>after reading all that you guys have written, I have used Safari's Inspect Element and identified this listener attached to the object:</p>

<p><img src="http://i.stack.imgur.com/ZWAV0.png" alt="enter image description here"></p>

<p>is this of any help? Now the question: how do I fire the method associated with this image from javascript? Thanks guys.</p>
