开发者

Fancybox and ASP.NET Button OnClientClick

Today i use a window.showMod开发者_JAVA技巧alDialog function to show a modal popup to user. I'm tryng to use the Fancybox plugin to replace it. But, i'm having a problem. I put the popup function in a OnClinetClick property of my button. When the popup is closed the OnClick of the server is fired. When I use the Fancybox plugin the popup and the server OnClick are executed at the same time. Is there a way to use fancybox like a window.showModalialog? I want to fire the server OnClick only when the fancybox popup is closed.

Thanks


Tough to debug without seeing your code, but have you tried adding 'return false;' after your call to Fancybox in OnClientClick?

eg:

OnClientClick="yourFunctionCall(); return false;"

That should prevent the postback. You can then hook into the Fancybox's close event (or whatever) to do what you need to do when it's closed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜