jQuery的的fancybox停止从工作ASP.NET注销链接 [英] jQuery FancyBox stopping ASP.NET Logout link from working

查看:98
本文介绍了jQuery的的fancybox停止从工作ASP.NET注销链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的fancybox jQuery插件(http://fancybox.net/)在我的ASP.NET网站,并纷纷创出小,但恼人的问题。

I am using the FancyBox jQuery plugin (http://fancybox.net/) in my ASP.NET website and have hit a small but annoying issue.

该网站使用默认的ASP.NET登录控件,然后显示一些链接弹出该在的fancybox打开表单 - 这一切的伟大工程。如果我的的点击任何链接的fancybox的,然后打注销链接(由LoginStatus控件提供)再次一切正常,因为它应该。

The site uses the default ASP.NET login controls and then displays some links which pop open a form in a FancyBox - all this works great. If I do not click any of the FancyBox links and then hit the logout link (provided by the LoginStatus control) again everything works as it should.

但是,如果我点击的fancybox链接之一,然后将其关闭注销链接不再起作用,什么都不会发生在所有 - 仿佛回发在不触发由于某种原因它会出现

However if I click on one of the FancyBox links and then close it the logout link no longer works, nothing happens at all - it would appear as if the postback is not firing for some reason.

我已经做了一些搜索,但跨越任何一个有类似的问题不来 - 有没有人见过这个问题?

I have done some searching but not come across anyone with a similar issue - has anyone seen this issue before?

在此先感谢

更新:从IE浏览器的调试器一点点帮助,我已经跟踪这个问题到一个JavaScript错误在这里 -

UPDATE: With a little help from IE debugger I have tracked the problem down to a JavaScript error here -

function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
    theForm.__EVENTTARGET.value = eventTarget;
    theForm.__EVENTARGUMENT.value = eventArgument;
    theForm.submit();
}

更具体地说上设置事件目标而行我收到的错误是 -

More specifically on the line that sets the eventtarget and the error I recieve is -

SCRIPT5007:无法设置属性价值的价值:对象为null或undefined

SCRIPT5007: Unable to set value of the property 'value': object is null or undefined

更新2:我已经建立了一个临时的解决办法 - 基本上我只是挂钩到onClosed事件,并在该点重新载入页面 -

UPDATE 2: I have put a temporary fix in place - basically I just hook into the onClosed event and reload the page at that point -

$("#form_popup").fancybox({ 
'scrolling': 'no', 
'titleShow': true, 
'onClosed' : function() { 
    location.reload(); 
} });

当然,问题是该页面将完全从头开始重新装载缺少使用jQuery的点,但至少它的工程!

Of course the problem is the page will be fully reloaded from scratch missing the point of using jQuery but at least it works!

推荐答案

对于任何人谁拥有我这个解决了这个同样的问题,破解

For anyone who has the same problem I fixed this with this hack

$("#form_popup").fancybox({ 
 'scrolling': 'no', 
 'titleShow': true, 
 'onClosed' : function() { 
 location.reload(); 
} });

所以,只要关闭按钮被按下它解决问题的页面重新加载得到

So the page gets reloaded whenever the close button is pushed which fixes the problem.

这篇关于jQuery的的fancybox停止从工作ASP.NET注销链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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