Why is my JavaScript if statement not working?
<p>The first <code>if</code> statement is not working although I passed the value of the block parameter as <code>physicalActivityBlock</code>:</p>

<pre><code>function obj(select,block,idName) {
    var a=document.getElementById(select).value;
    var b=document.getElementById(block);
    var i=0;
    b.innerHTML = '';

   if(block=='physicalActivityBlock'){
       b.appendChild('&lt;p&gt;hello&lt;/p&gt;');
   }
}
</code></pre>
