Javascript: Disabling drop-down based on other drop-down
<p>I have a Javascript function in my website. I don't know Javascript very well but, I want to modify it.</p>

<p>This section loads a third drop box, depending on the first two.</p>

<p>I want to modify it to disable the third one if the second drop box <code>locatie</code>'s value is <code>util</code>.</p>

<pre><code>jQuery( function () {
  jQuery("#util, #loc").change( function() {
    var locatie =  jQuery("#loc").val();
    var utilitate = jQuery("#util").val();

    if ( (locatie!= '---') &amp;&amp; (utilitate!='---') ) 

        jQuery.getJSON("index.php?option=com_calculator&amp;opt=json_contor&amp;format=raw",{ locatie: locatie, utilitate: utilitate }, function (data) {
                var html = "";

                html += "&lt;option name=den_contor value ='contor' &gt;Alege Contorul&lt;/option&gt;";
                if ( data.success == 'ok' ) 
                for (var i in data.val) 
                    html += "&lt;option name=den_contor value ='"+ i+"' &gt;" + data.val[i]+ " &lt;/option&gt;";
                jQuery("#den_contor").html( html )    

        })

     })
  });`
</code></pre>

<p>Thanks,
Sebastian</p>
