[wp-trac] [WordPress Trac] #20770: Introduce AJAX response message

WordPress Trac wp-trac at lists.automattic.com
Tue May 29 18:10:09 UTC 2012


#20770: Introduce AJAX response message
-----------------------------------------------+---------------------------
 Reporter:  alexvorn2                          |       Owner:
     Type:  defect (bug)                       |      Status:  new
 Priority:  normal                             |   Milestone:  Awaiting
Component:  Widgets                            |  Review
 Severity:  minor                              |     Version:
 Keywords:  2nd-opinion has-patch ui-feedback  |  Resolution:
-----------------------------------------------+---------------------------
Changes (by SergeyBiryukov):

 * keywords:  2nd-opinion has-patch => 2nd-opinion has-patch ui-feedback


Old description:

> 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

New description:

 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#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list