App is loading each time

☆樱花仙子☆ 提交于 2019-12-24 14:08:55

问题


I have web application of flex. It's swf file is attached on a tabview. Means there are 5 tabs on the page. On the tab Five a swf file is attached.

When I click on five tab it load the init method of main mxml file of flex application. Is there any way so we can stop to load it every time when we click on Five tab.

This app get the data from server when load the application. But I don't want to send the request again and again when click on tab everytime.


回答1:


Using <a href=""> to display your tabs is probably making them reload with each click. Instead try a script solution to set the display value of each tab. Loop through them all and hide every one except the one clicked on.

This way you only load them once.

EDIT: looks like you are using JQuery. Some possible answers:

  • here
  • here
  • here (not jquery)


来源:https://stackoverflow.com/questions/15499610/app-is-loading-each-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!