title: how to disable input text on condition
body: <p><a href="https://i.stack.imgur.com/WG1Jz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WG1Jz.png" alt="enter image description here" /></a>i would want to disable some input text when a certain condition is met. one input text value will be used as a key of the condition. imagine having 6 input and 2 getting data from table and these getting data from table 1 to store condition value. i want a scenario like, if text2.value is 'test'  then text3 and text 4 should be disable.</p>
  <p>this is what i have done
  am tagging js,jq and hmtl maybe one could provide an assistance</p>
  <p>html</p>
  <pre><code>          &lt;input type=&quot;hidden&quot; name=&quot;ttype[&lt;?php echo $ix ?&gt;]&quot; value=&quot;&lt;?php echo 
            $rowx['testtype']; ?&gt;&quot;/&gt;
                                           
                                           
           &lt;td colspan=&quot;0&quot;&gt;  Result &lt;br&gt; 
          &lt;div&gt;
            &lt;select name=&quot;negpos[&lt;?php echo $ix ?&gt;]&quot;     style='width:50px'&gt;
            &lt;option selected value=''&gt; Select One &lt;/option&gt;
            &lt;option value='Pos'&gt; Positive&lt;/option&gt;
            &lt;option value='Neg'&gt; Negative&lt;/option&gt;
            &lt;option  value='N/P'&gt; Not Provided&lt;/option&gt;
            &lt;/select&gt;
            &lt;span id=&quot;sresultInfo&quot;&gt;
            &lt;/span&gt;
            &lt;/div&gt;
            &lt;/td&gt; 
  
          
                                       
            &lt;td&gt;&lt;input type=&quot;text&quot;   name=&quot;WBC[&lt;?php echo $ix ?&gt;]&quot;size =&quot;3&quot; /&gt;&lt;/td&gt;
             &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;HGB[&lt;?php echo $ix ?&gt;]&quot;size =&quot;3&quot; /&gt;&lt;/td&gt;
             &lt;td&gt; &lt;input type=&quot;text&quot; name=&quot;RBC[&lt;?php echo $ix ?&gt;]&quot; size =&quot;3&quot; value=&quot;&quot;/&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;Lymph[&lt;?php echo $ix ?&gt;]&quot;size =&quot;3&quot;/&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;MCV[&lt;?php echo $ix ?&gt;]&quot; size =&quot;3&quot;/&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type=&quot;text&quot; name=&quot;Gran[&lt;?php echo $ix ?&gt;]&quot; size =&quot;3&quot;/&gt;&lt;/td&gt;
              &lt;td&gt; &lt;input type=&quot;text&quot; name=&quot;MCH[&lt;?php echo $ix ?&gt;]&quot; size =&quot;3&quot;/&gt; &lt;/td&gt;
  </code></pre>
  <p>js</p>
  <pre><code>        $(document).ready(function(){
       
      
           var ttyp =   document.getElementById(&quot;ttype&quot;).value  ;
   
              if (ttyp = &quot;MPP&quot; ){
   
            document.getElementById('WBC').disabled = true;
            document.getElementById('HBG').disabled = true;
            document.getElementById('RBC').disabled = true;
  
           } else {
  
            document.getElementById('WBC').disabled = false;
            document.getElementById('HGB').disabled = false;
            document.getElementById('RBC').disabled = false;
  
           }
       
         });
  </code></pre>