Consider this an upvote for better error handling around ajax requests in the UI tab widget.
The same thing happens to me. The tabs stop responding, and the tab that had the error remains stuck with the "Loading..." spinner. It'd be nice if we could trap which one of the ajax requests failed so that we could show a message to the user / disable that tab. Dean On Apr 7, 10:29 pm, JBeckton <[email protected]> wrote: > Hello, > > I have some UITabsset up usingAJAXcalls to populate the container, > set it up as suggested on the jQuery UI site. > > In myAJAXoptions I have a handler forerrorevent. I purposely broke > the remote page to test theerrorhandling. When I click the tab that > calls the remote page myerrorcallback runs as expected but now when > I try to select the othertabsthey freak out! I either have to click > on them twice or they may load each others content inside them at the > same time. Very strange! > > My application handles theerrorand returns the http status 500 so > theAJAXwill know it took a crap. > > Here is my code. > HTML: > > <div class="AJAXErrorContainer" style="display:none"></div> > <div id="caseManagerWorkbench" class="ui-tabsui-widget ui-widget- > content ui-corner-all"> > <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget- > header ui-corner-all"> > <li class="ui-state-default ui-corner-top ui-tabs-selected > ui-state- > active"><a href="index.cfm?fuseaction=casemanager.exhibits" > title="Exhibits">Exhibits</a></li> > <li class="ui-state-default ui-corner-top"><a href="index.cfm? > fuseaction=casemanager.checkwriter" title="Check Writer">Check Writer</ > a></li> > <li class="ui-state-default ui-corner-top"><a href="index.cfm? > fuseaction=casemanager.comments" title="Comments">Comments</a></li> > <li class="spinnerContainer"></li> > </ul> > <div id="Exhibits"></div> > <div id="Check_Writer"></div> > <div id="Comments"></div> > </div> > > JavaScript: > $(function() { > > //builds the tab interface for viewing the submittal data > $("#caseManagerWorkbench").tabs({ ajaxOptions: { > > async: false, > > cache: false, > > success: function() { > > > $(".AJAXErrorContainer").hide(); > > }, > > error: function() { > > > $(".AJAXErrorContainer").html("Anerrorhas occured > during the remote request, Please try again."); > > > $(".AJAXErrorContainer").show(); > > } > > }, > > spinner: null, > > select: function() {$(".spinnerContainer").html("<span > style='color:white;'><img src='images/ajax-loader-blue.gif' hspace='5' > vspace='4' align='absmiddle'> Loading...</span>");}, > > load: function() {$(".spinnerContainer").html("");} > }); > > }); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery UI" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-ui?hl=en -~----------~----~----~----~------~----~------~--~---
