$(document).ready(function() {
$(function() {
$("#dialog").dialog({
autoOpen: false
});
$("#btnAddDT").on("click", function() {
$("#dialog").dialog("open");
});
});
// Validating Form Fields.....
$("#btnOK").click(function(e) {

var datatype = $("#txtDataTypeName").val();

if ( datatype === '') {
alert("Please Enter Datatype...!!!!!!");
e.preventDefault();
} 
 else {
alert("Form Submitted Successfully......");
}
});
});