title: How to check if textbox is empty in jquery dialog
body: <p>I have one jquery dialog in my app.</p>
  
  <p>Here Is how It is made</p>
  
  <pre><code>    var routePopup = "Route Name : &lt;input type='text' id='routeName' name='routeName'/&gt;";
  
  
      document.getElementById('popUp').innerHTML = "";
      document.getElementById('popUp').innerHTML = routePopup;
  
      $("#popUp").dialog({
          title: "Route Name",
          resizable: false,
          width: auto,
          height: auto,
          buttons: {
              "Create Route": function () {
                  $(this).dialog("close");
              }
          }
      });
  </code></pre>
  
  <p>now I want to check if textbox is empty or not. If it is empty then it should not allow to close the popup.</p>
  
  <p>Also It should give message on top that the value can not be empty.</p>