PDA

View Full Version : Load Grid JS only when needed



zakif
24 Oct 2011, 3:22 AM
Dear all,

I have a panel, grouptabpanel, and tabpanel. The tabpanel contains grid.

My problems are two:

1. I have a grouptab.js that contains panel, and grouptabpanel. Beside that, I have a view files (index.phtml) that declare all of grids. By loading the frontpage (index.phtml), all of grid file is (.js) loaded too which is resource-heavy. If the declaration (via <script> </script>) is missing, then the frontpage will be blank. How to change that, so the grid is loaded only when the menu (in tab panel) clicked?

2. Are there any tricks to get Ext JS faster and more efficient?

Thanks in advance for your answers.