fancybox关闭后的jquery错误

时间:2012-06-29 16:18:30

标签: jquery fancybox

我是fancybox的新用户,我正在尝试使用它来登录用户到该网站。这是我的代码。

<div id="workbenchToolButton" align="right" style="position:relative; top:5px;" >
<a id="tip5" href="#login" class="fancybox" ><img src="/images2/buttons/cust_tool_add.png" /> </a> 
</div>
<div style="display:none">

<table id="login" width="330" height="100%" cellspacing="0" cellpadding="4" style="border-collapse:collapse; border: 1px solid #E8E8E8; background-color: #F2F2F2; font-size: 13px;">
<form name="login" action="" method="post">
<input type="hidden" id="href" name="href" value="<?php echo curPageURL();?>">
<tr>
<td style="text-align: center; font-weight:bold;" colspan="2"><div style="margin: 7px 0 7px 0;">Returning Customers</div></td>
</tr>
<tr>
<td class="width"><? echo ENTRY_EMAIL_ADDRESS; ?></td>
<td><? echo tep_draw_input_field('email_address'); ?></td>
</tr>
<tr>
<td class="width"><? echo ENTRY_PASSWORD; ?></td>
<td><? echo tep_draw_password_field('password'); ?></td>
</tr>
<tr>
<td class="width"></td>
<td align="left"><input type="submit" value="Sign In"></td>
</tr>
<tr>
<td class="width"></td>
<td align="left" style="font-weight:bold;">
<? echo '<a class="hyper" href="' . tep_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL') . '">' . 'Forget your password?' . '</a>'; ?>
<br><br>
</td>
</tr>
</form>
</table>

</div>

以下是我用来提交它的功能。

$("#tip5").fancybox({
'scrolling'     : 'no',
'titleShow'     : false,
'onClosed'      : function() {
$("#login_error").hide();
}
});

$("#login").live("submit", function(e) {
e.preventDefault();
if ($("#email_address").val.length < 1 || $("#password").val.length < 1) {
$("#login_error").show();
$.fancybox.resize();
return false;
}

$.fancybox.showActivity();

$.ajax({
type    : "POST",
cache   : false,
url     : "login.php?action=process",
data    : $(this).serializeArray(),
success: function(data) {
$.fancybox(data);
},
})
});

页面首次加载时出现此错误 语法错误

数据:,

我提交fancybox后关闭并重新加载页面。页面挂起,我在firebug中收到此错误。

“f.document.body is null”

jquery-1.5.1.min.js抛出错误。

0 个答案:

没有答案
相关问题