I have one jquery dialog in my app.
Here Is how It is made
var routePopup = "Route Name : <input type='text' id='routeName' name='routeName'/>";
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");
}
}
});
now I want to check if textbox is empty or not. If it is empty then it should not allow to close the popup.
Also It should give message on top that the value can not be empty.