EasyUI Forum
April 29, 2024, 03:46:44 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: tabs issue  (Read 6593 times)
Gavin
Newbie
*
Posts: 1


View Profile Email
« on: January 02, 2014, 08:35:26 PM »

when i use the tabs plugins to create a tab (for example, href="welcome.html"), but the page not exists.
in the tab content, it always "loading...", in the console, I can find the 404 error.
the question is:
how can I catch the 404 error, and do something(for example, open another page)?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: January 03, 2014, 12:03:54 AM »

Please try the code below to register the error handler to the tab panel.
Code:
var t = $('#tt');
var p = t.tabs('getTab',0);  // get the tab panel
p.ajaxError(function(e,xhr){
  console.log(xhr.status);
});
p.panel('refresh','...');
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!