Boopathy S
asked on
Need to create window dialog box using jQuery
I'm new to this jQuery, I want to create the dialog box using jQuery, if the empty column occurs. I have tried one method as like below
I'm getting the output in the UI is:
refer IMAGES123.JPG
How I can create the box with text, in the css also tried, but not getting the window box. Please suggest me some idea and please provide some coding for creating the window dialog box also. Thanks in advance
images123.jpg
var apiHost = "";
var apiResUrl = "/v1/resources";
var apiAddNewEmployee = "/addemployee";
var dialog = "/dialog"
var data = $(newEmpForm).serializeArray();
$(".successMSG").hide();
$(".errorMSG").hide();
$.ajax({
url: apiHost + apiResUrl + apiAddNewEmployee,
type: 'POST',
data: JSON.stringify(data),
headers: { token: $.cookie('token') },
contentType: "application/json",
error: function(err) {
$( "#dialog" ).dialog();
}
In Html I tried as like:<div id="dialog">
<div>
<p>Empty won't allow</p>
</div>
</div>
I'm getting the output in the UI is:
refer IMAGES123.JPG
How I can create the box with text, in the css also tried, but not getting the window box. Please suggest me some idea and please provide some coding for creating the window dialog box also. Thanks in advance
images123.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
In your example, an empty column would be validated at the server side, so the AJAX call would be successful.