I click on the first button which gives me a popup with another button to be clicked. When I click on that second button, I want the condition to be checked and return an alert.
#chkValid - first button ID
#okButton - second button ID
jQuery("#chkValid").on("click", viewSomething);
function viewSomething() {
  jQuery("#okButton").click(function() {
    if (jQuery('#Field_6').val() != "MD") {
      alert("It has to be MD");
    }
  });
}
 
    