JQuery JDialog 弹出
我想要一个 JQuery jDialog 弹出屏幕,需要在 5 秒后填充(例如:响应花费的时间比弹出屏幕上的内容预期要长),并且需要在收到响应后自动关闭。我在 JQuery 中有一个 AJAX 方法,我需要在其中集成 JDialog 屏幕以延迟响应。
任何线索将不胜感激。
谢谢
I want to have a JQuery jDialog popup screen which needs to be populated after 5 seconds (Say: Response is taking more time than expected as content on pop up screen) and needs to be auto closed once i get the response. I have an AJAX methods in JQuery on which i need to integrate the JDialog screen for deplayed response.
Any leads would be much appreciated.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Ajax 方法的就绪状态为
0:请求未初始化(在调用 open() 之前)。
1:请求已设置,但未发送(在调用 send() 之前)。
2:请求已发送并正在处理中(此时您通常可以从响应中获取内容标头)。
3:请求正在处理中;通常,响应中提供了一些部分数据,但服务器尚未完成其响应。
4:响应完成;您可以获取服务器的响应并使用它。
使用这个状态你就可以做到。
构建一个 pop 并在就绪状态“2 & 3”时调用它,可以使用 setTimeout(popup(),5000);
并在就绪状态“4”时销毁该弹出窗口
Ajax method have ready states
0: The request is uninitialized (before you've called open()).
1: The request is set up, but not sent (before you've called send()).
2: The request was sent and is in process (you can usually get content headers from the response at this point).
3: The request is in process; often some partial data is available from the response, but the server isn't finished with its response.
4: The response is complete; you can get the server's response and use it.
Using this state you can do it.
Build a pop and call it when ready state "2 & 3", you can use setTimeout(popup(),5000);
ANd destroy that popup on ready state "4"