[wp-trac] [WordPress Trac] #20770: Introduce AJAX response message
WordPress Trac
wp-trac at lists.automattic.com
Tue May 29 02:34:10 UTC 2012
#20770: Introduce AJAX response message
--------------------------+-------------------------------------
Reporter: alexvorn2 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version:
Severity: minor | Keywords: needs-patch 2nd-opinion
--------------------------+-------------------------------------
when clicking on Save button of a widget, a error should appear if the
user is logged out.
So after clicking the button the wpspin animated images disappears and
nothing happens. This can be a problem if the current user think he is
logged in and he is not, the settings just will not be saved.
Sometimes the server is not working.
Need to adjust the javascript code and php:
in php we can use die function : die('1') or die('success');
in javascript something like this:
$.post(ajaxurl, data, function(response){
if (response === 'success') {} else { alert('Fail to save'); }
});
http://wpimpact.com/wp-content/uploads/2012/05/Untitled-4.png
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20770>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list