diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_view/helpers/javascript_helper.rb | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 7034b95000..0c22996e02 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -72,7 +72,7 @@ module ActionView # :url => { :action => "undo", :n => word_counter }, # :complete => "undoRequestCompleted(request)" # - # The callbacks that may be specified are: + # The callbacks that may be specified are (in order): # # <tt>:loading</tt>:: Called when the remote document is being # loaded with data by the browser. @@ -81,13 +81,15 @@ module ActionView # <tt>:interactive</tt>:: Called when the user can interact with the # remote document, even though it has not # finished loading. - # <tt>:complete</tt>:: Called when the XMLHttpRequest is complete, - # and the HTTP status code is 200 OK. - # <tt>:failure</tt>:: Called when the XMLHttpRequest is complete, - # and the HTTP status code is anything other than - # 200 OK. - # - # You can further refine <tt>:failure</tt> by adding additional + # <tt>:success</tt>:: Called when the XMLHttpRequest is completed, + # and the HTTP status code is in the 2XX range. + # <tt>:failure</tt>:: Called when the XMLHttpRequest is completed, + # and the HTTP status code is not in the 2XX + # range. + # <tt>:complete</tt>:: Called when the XMLHttpRequest is complete + # (fires after success/failure if they are present)., + # + # You can further refine <tt>:success</tt> and <tt>:failure</tt> by adding additional # callbacks for specific status codes: # # Example: @@ -96,6 +98,7 @@ module ActionView # 404 => "alert('Not found...? Wrong URL...?')", # :failure => "alert('HTTP Error ' + request.status + '!')" # + # A status code callback overrides the success/failure handlers if present. # # If you for some reason or another need synchronous processing (that'll # block the browser while the request is happening), you can specify |