Pokazywanie postów oznaczonych etykietą JavaScript. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą JavaScript. Pokaż wszystkie posty

wtorek, 24 lipca 2012

Dojo Toolkit: Content of the first tab in dijit.layout.TabContainer is not displayed

dijit.layout.TabContainer
Dojo Toolkit 1.7.1

To fix this problem refresh the first tab by switching to the second and then to the first tab. See the code below:

var tabContainer = dijit.byId('tabContainerID'),
firstTab = dijit.byId('firstTabID'),
secondTab = dijit.byId('secondTabID');
 
tabContainer.selectChild(secondTab);
tabContainer.selectChild(firstTab);

niedziela, 11 marca 2012

Descript.org

Have you ever thought about serious object-oriented programming in JavaScript? Try Descript:
" Descript is a lightweight foundation framework for advanced JavaScript applications development. "
" Main idea of Descript is providing a well-organized and object-oriented approach in the easiest and most legible way. "

jQuery tubular

 Look at the very interesting jQuery tubular plugin today:
" Tubular is a jQuery plugin that lets you set a YouTube video as your page background. "


poniedziałek, 27 lutego 2012

Dojo Toolkit: Refreshing store of dijit.form.ComboBox

dijit.form.ComboBox
Dojo Toolkit 1.7.1

It's impossible now to refresh a store of a combobox through assigning new store object to the "store" attribute. But you can use this simple solution:

var myComboBox = {};

function fReloadDataToComboBox()
{   

    if(myComboBox)
    {
        myComboBox.destroyRecursive(false);
    }

    var myStore = new dojo.data.ItemFileReadStore({
        url: "myService"
    });

    myComboBox = new dijit.form.ComboBox({
        id: "myComboBox",
        name: "my_name",
        store: myStore,
        searchAttr: "name",
        onChange: fOnChangeComboBox
    });

    dojo.place(myComboBox.domNode, dojo.byId("myDiv"));      
}