Stop Double execution of events
<p>So I have two text elements A and B, and on the onblur event of both objects I have the same validation function that will popup a message if B (a date field) is wrong.  Now, If I change A, and then select B, it will run the function twice.  it seems it runs it once for the onblur of both A and B.  This causes the user to get the same error message twice.</p>

<p>What do I need to do to force the onblur of A to not allow any other events to kicked off?</p>

<p>Here is an exmaple code i made up.  If you are on the 2nd field, and try to go to the first, if will run the function twice</p>

<pre><code>function myVal(){
    if (document.getElementById("B").value == 'Z') {
        alert('Bad Value');
        document.getElementById("B").focus();
    }
}
</code></pre>

<hr>

<pre><code>&lt;form&gt;
    &lt;input name="A" value="A" onblur="myVal();"/&gt;
    &lt;input name="B" value="Z" onblur="myVal();"/&gt;
&lt;/form&gt;
</code></pre>
