Jquery加载屏幕通过PHP覆盖大型mysql查询? [英] Jquery loading screen to cover a large mysql query via PHP?

查看:65
本文介绍了Jquery加载屏幕通过PHP覆盖大型mysql查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正处于我的客户端的报告工具中,如果它们是X天,它基本上可以动态重建报告。

I'm in the middle of a reporting tool for my client which basically rebuilds reports on the fly if they are X days old.

问题在于报告是用PHP重建的,其中一些可能非常大,意味着20-40秒的加载时间。

The issue is that the reports are rebuilt with PHP, and some of them can be pretty big, meaning 20-40 second loading times.

目前,它只是在页面执行时挂起查询。

At the moment, it just hangs the page while it performs the query.

我想要做的是在查询开始之前将某种jquery加载覆盖放置到页面中,然后在查询完成时,重定向到另一个页面(将显示结果)。

What I'm wanting to do however is have some sort of jquery loading overlay placed into the page before the query starts, and then when the query finishes, redirect to another page (where the results will be shown).

我认为只要在运行查询之前将html加载到页面中,我就是正确的加载屏幕应该显示,然后一旦查询完成,我可以放置另一个HTML来对另一个页面进行元刷新(显然,标题重定向是不可能的,因为标题已经被发送)。

Am I right in thinking that as long as I load the html into the page BEFORE running the query, the loading screen should display, and then once the query is finished, I can place another bit of HTML to do a meta refresh to another page (obviously a header redirect is out of the question as the headers would have already been sent).

如果这是正确的,任何人都可以推荐任何基于jquery的加载插件都不错?

If this is correct, could anyone recommend any half-decent jquery based loading plugins?

非常感谢

推荐答案

不确定,你写的是什么意思

Not that sure, what you mean by writing


我认为只要我在运行之前将html加载到页面中就是正确的查询,加载屏幕应该显示,然后一旦查询完成,我可以放置另一个HTML来对另一个页面进行元刷新(显然,标题重定向是不可能的,因为标题已经被发送)。

Am I right in thinking that as long as I load the html into the page BEFORE running the query, the loading screen should display, and then once the query is finished, I can place another bit of HTML to do a meta refresh to another page (obviously a header redirect is out of the question as the headers would have already been sent).

但是让我告诉你,我们之前做过的事情:

But let me tell you, what we have done earlier:

通过点击XLS-Export的导出按钮,出现了一个模态覆盖,并发送了导出请求。从那时起,JS一直在寻找具有特定名称的cookie。在服务器端,生成导出,并在完成cookie后与XLS数据一起发送。 JS识别出已发送的cookie并隐藏了叠加层。

By clicking on the export-Button of a time-taking XLS-Export a modal overlay showed up and the request for the export was sent. From that moment on, JS was constantly looking for a cookie with a specific name. On the server side the export was generated and after finishing a cookie was sent along with the XLS data. JS recognized the sent cookie and hid the overlay.

希望这会有所帮助。

这篇关于Jquery加载屏幕通过PHP覆盖大型mysql查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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