show dialog for option submit data -


I have a submission form. I want to show a jquery dialog when someone submits the same data "This data first Exists from! Are you sure about input? " Then select OK or Cancel Can you please tell me what should I do? Thank you.

Send an AJAX request with data from the server - with it, and if the data is present then any The type of error code is returned. Then check for error in AJAX handler, if it is present then "data added" will not show the message to show the message "already exists". The server-side should check the duplicate, as well as enter new data as well.

If the user selects "OK" in the "Data Exists" dialog, then send another request with the parameter to prevent duplicate error.

> Customers:

  $ Post ("server.php", {"data": somedata}, function (result) {if (result.error & amp; result.error == 1) if (confirm ("duplicate data, continue? ") $ .post (" server.php, {"data": somedata, "suppress": 1}, function (result) {warning ("data was added");); other warning ("data added  

Server: Data ']) and $ _POST [' data '] = "") {if (check _duplicate ($ _ POST [' data ']) // this & amp; Do not forget to apply $ _POST ['press']!] = 1) return' {"error": 1} '; else {insert_data ($ _ POST [' data ']); return' {OK } '; // You can also return empty string properly}}


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -