Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Titanium.PAGE_LOAD

var win4 = Titanium.UI.createWindow({  
    //title:'Favourites',
    backgroundColor:'#000',
    barImage:'titles/titleSettings.png'
});
var tab4 = Titanium.UI.createTab({  
    icon:'icons/icoSettings.png',
    //title:'Tab 1',
    window:win4


});

win4.addEventListener(Titanium.PAGE_LOAD,function() {
 alert("Window 4 loaded");
 Ti.API.info("hello");
},true);

Hi I am trying the run a function when tab4 is press but the onload dose not work.

can anyone help me run a function when a tab is clicked

Thanks in advance

— asked September 23rd 2010 by Alan Young
  • iphone
  • onclick
  • tab
  • titanium.page_load
0 Comments

1 Answer

  • The correct name of the event constant is Titanium.PAGE_LOADED (Actually Ti.PAGE_LOADED in the successor to Titanium Desktop: TideSDK )

    — answered November 13th 2012 by Fredrik Motin
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.