EasyUI Forum
September 14, 2025, 06:15:30 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  General Category / EasyUI for jQuery / onselect for a specfic tab on: September 07, 2013, 11:17:30 AM
Hi

I have some tabs, and want to do a onselect for a specific tab. I have this code, it works, but I think it can be done more "smooth" (do the on select for a specific tab)

Code:
$(document).ready(function(){


$('#tttabs').tabs({
    onSelect: function(title, index){

var tab = $('#tttabs').tabs('getSelected');
var hest = $('#tttabs').tabs('getTabIndex',tab);
//alert(hest);
if(hest == 1) {


//////////////////////////////////////////////
$('#left option').each(function(index, option) {
$(option).remove();
});
////////////////////////
  $.getJSON('selectMenus.php', function(data){
        $.each(data, function(index,item) {
           $("#left").append("<option value=" + item.phone+ ">" + item.firstname + " " + item.lastname +"</option>");
    });
    });

////////////////////
}
    }       
});

});

/Jesper
2  General Category / EasyUI for jQuery / Re: Tabs - refresh on: September 05, 2013, 01:00:40 PM
Hi

Think I have found a solution I have added this to a tab:

Code:
data-options="href:'FILE.php', cache:false"

When I load the page, I see the content of FILE.php, then I change the contents, and then jump to another tab, and then go back Smiley and then I see the new content of FILE.php

/JEsper
3  General Category / EasyUI for jQuery / Tabs - refresh on: September 05, 2013, 12:48:15 AM
Hi

I need some advice to work with tabs.

I have two tabs. At the first tab I have added a datagrid, where I add useres.

At tab two I have a form, where one of the fields (dropdown menu) at the from contains data there are added from the data grid.

The drop down conten should be populated from the database ( I guess some ajax in PHP).

But if I add new data in the datagrid, how do I then "refresh" the content at the tab with the form??

Any ideas/advice

/Jesper
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!