If I use alert( mv + " " + uv); in this function the values are outputted correctly to the dialog but if I use the 'if' statement shown below I am not getting alerted when mv = 'URL' and uv is empty.

What have I done wrong?

$('#media').change( function() {
      var mv = $('#media :selected').text();
      var uv = $('#url').val();

       if ((mv=='URL') && (uv=="")) {
         alert('Please enter a valid URL');