应用程序会在每次加载 [英] App is loading each time

查看:190
本文介绍了应用程序会在每次加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有弹性的Web应用程序。它的SWF文件是安装在一个TabView的。意味着有5个标签页上。在标签五SWF文件附后。

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.

当我点击五个标签中,加载Flex应用程序的主MXML文件的init方法。有什么办法,所以我们可以停下来,每次加载它,当我们点击五个选项卡。

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.

推荐答案

使用< A HREF =>,以显示你的卡很可能使他们与每一个点击刷新。相反,尝试一个脚本解决方案来设置显示每个标签的值。通过所有这些循环和隐藏每个人,除了一个点击。

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.

编辑:看起来你正在使用的JQuery。一些可能的答案:

looks like you are using JQuery. Some possible answers:

  • <一个href="http://stackoverflow.com/questions/2952020/javascript-hide-show-tabs-using-jquery">here
  • 这里
  • <一个href="http://www.daniweb.com/web-development/javascript-dhtml-ajax/threads/172884/javascript-showhide-tabs"相对=nofollow>这里(不jQuery的)
  • here
  • here
  • here (not jquery)

这篇关于应用程序会在每次加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆