Guest User

Untitled

a guest
Jul 11th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. addTab : function( goURL, goTitle, goParams ){
  2. var NewTab = Ext.getCmp('mainTabs').add({
  3. title : goTitle,
  4. autoScroll : true,
  5. bodyStyle : 'padding:25px',
  6. closable : true,
  7. iconCls : 'x-status-valid',
  8. autoShow : true,
  9. autoLoad: {
  10. url: goURL,
  11. params: goParams, // or a URL encoded string
  12. discardUrl: true,
  13. nocache: true,
  14. text: "Loading...",
  15. timeout: 60,
  16. scripts: false // Save time by avoiding RegExp execution.
  17. //callback: yourFunction,
  18. //scope: yourObject, //(optional scope)
  19. }
  20. }).doLayout();
  21. alert(NewTab);
  22. Ext.getCmp('mainTabs').setActiveTab( NewTab );
Add Comment
Please, Sign In to add comment