Multiple condition on dom events
<p>I have need to do two things on a single DOM event</p>

<p>I tried using this but it won't work.</p>

<p>HTML </p>

<pre><code>&lt;input type="test" name="box" id="box" onkeyup="keyPressedBox(this)"&gt;
&lt;input type="test" name="name" id="name" onkeyup="keyPressedName(this)"&gt;

&lt;input type="checkbox" class="form-checkbox" checked="checked" id="sdp_1" name="sdp_1" /&gt;
&lt;input type="checkbox" class="form-checkbox" checked="checked" id="sdp_2" name="sdp_2"/&gt;
</code></pre>

<p>Javascript  </p>

<pre><code>&lt;script&gt;
     function keyPressedName(str) {
        if ($(str).val() != '') {
            $('#sdp_2').prop('checked', false);
        } else {
            $('#sdp_2').prop('checked', true);
        }

        return true;
    }

    function keyPressedBox(str) {
        if ($(str).val() != '') {
            $('#sdp_1').prop('checked', false);
        } else {
            $('#sdp_1').prop('checked', true);
        }
        return true;
    }


&lt;/script&gt;
</code></pre>

<p>Any Ideas ?</p>
