EasyUI Forum
May 03, 2024, 10:29:50 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: messager.alert and close tab  (Read 19120 times)
baxter
Newbie
*
Posts: 32


View Profile Email
« on: July 17, 2012, 10:26:47 AM »

Hey,

how can i realized that the active (or last open) tab ist close when i closed the messager.alert window?

I had try this but not work;-):

$.messager.alert("info",  STATUS29, "info", function(){
    var tab = $('#systabs').tabs('getSelected');
    $('#systabs').tabs('close', {tab: tab});
});
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: July 17, 2012, 08:10:54 PM »

You pass a wrong parameter value to the 'close' method. Please refer to the following code:
Code:
$.messager.alert("info",  STATUS29, "info", function(){
    var tab = $('#systabs').tabs('getSelected');
    var index = $('#systabs').tabs('getTabIndex', tab);
    $('#systabs').tabs('close', index);
});
Logged
baxter
Newbie
*
Posts: 32


View Profile Email
« Reply #2 on: July 18, 2012, 11:06:10 AM »

Thanks again... works too, you are my hero today;-)
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!