两秒钟后关闭fancybox.我的意思是,我需要添加一个时间控件以关闭fancybox [英] close fancybox after two seconds . I mean , i need to add a time control to close fancybox
问题描述
大家好,
我只有一页:confirmOrders.aspx
.
在confirmOrders.aspx
页上,有一个打开fancybox的链接.
当用户单击该链接时,myorders.aspx
随即打开并带有fancybox.
一切都好.我的问题是:
此页面完成了一些数据库工作(myorders.aspx
).用户单击此保存按钮即可完成所有这些工作.通过单击此按钮,一些消息会显示给用户.
单击此按钮,我想关闭fancybox并刷新主页(CONFIRMORDERS.ASPX
).因此,我需要在此代码中添加时间控制:
Hello everyone,
I have one page : confirmOrders.aspx
.
On this confirmOrders.aspx
page , there is a link that opens fancybox.
When user clicks that link myorders.aspx
opens with fancybox.
Everything is fine. My question is :
This page does some database works (myorders.aspx
). User clicks this save button to all these works are done. And some messages are shown to the user by clicking this button .
I want to close fancybox and refresh main page(CONFIRMORDERS.ASPX
) on click of this button. So I need to add time control to this code :
Page.RegisterClientScriptBlock("sdfs6s6", "<script> parent.location ='confirmOrders.aspx';parent.$.fancybox.close();</script>");
这段代码可以正常工作.我只需要在此代码上加上两秒钟即可.
谢谢
This code works fine . I need just add two seconds to this code.
Thanks
推荐答案
.fancybox.close();</script>");
.fancybox.close();</script>");
这段代码可以正常工作.我只需要在此代码上加上两秒钟即可.
谢谢
This code works fine . I need just add two seconds to this code.
Thanks
我不是网络开发人员,但也许会对您有所帮助
I am not web developer but maybe this will be of help to you
setTimeout("alert('hello')",5000);
//在5秒钟内发出警报.
这样,您可以将代码放入函数中,并使用setTimeout调用它,即
//does alert in 5 seconds.
With this you could put your code in a function and use setTimeout to call it i.e.
setTimeout(myFunc(), 5000);
我了解我的朋友,非常感谢.但是您的代码可以用来关闭任何常规页面.我需要做2项工作:
我需要用2秒钟关闭fancybox并刷新主页.我认为我需要在该代码上添加一些内容,但是要添加到哪里?它给了我语法错误.
此代码:
< b> Page.RegisterClientScriptBlock("sdfs6s6",& lt; script> parent.location =''confirmOrders.aspx''; parent.
I understand my friend thanks a lot . but your code can use to close any regular page. i need to do 2 jobs :
i need to close fancybox with 2 seconds and refresh main page . my opinion that i need to add something on that code but to where ? it gives me syntax error .
this code :
<b>Page.RegisterClientScriptBlock("sdfs6s6", "<script> parent.location =''confirmOrders.aspx'';parent.
这篇关于两秒钟后关闭fancybox.我的意思是,我需要添加一个时间控件以关闭fancybox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!