我想为在jQuery UI的dialog.I JavaScript的核心确认()的替代品使用此代码 bellow.But返回一些错误的替代品。使用jQueryUI的对话框,对JavaScript核心确认()
function CreateDialog(){
$("#diag-conf").dialog({show:'drop',hide:'drop',autoOpen:false,resizable:false,draggable:true,height:150,width:410,title:'Facebook Session Error!',modal:true,buttons:{"CONTINUE":function(){$(this).dialog("close");top.location.href=re_auth;},"CANCEL":function(){$(this).dialog("close");}}});
}
function digOpn(){
var m='my msg';
$('#digmsg').html(m);
//$("#diag-conf").dialog("open");
CreateDialog();
}
function sess_chk(){
if(fb_ses())return true;
else
{
digOpn();
return false;
}
}
现在,当我在一个onclick事件调用sess_chk()函数从我的代码不火的UI对话框,而抛出一个错误
Uncaught TypeError: Object [object Object] has no method 'propAttr' (jquery-ui.min.js:258)
我在做什么错在这里。??! !
编辑:
一些调试,我已经看到了“propAttr”错误被弹出 因为jQuery ui.So的多个实例反正我的代码工作 完美now.Even虽然我”后已经看到,在{digOpn();返回false} “返回false”不等待我的UI对话框中单击值,并执行 immediately.But不找我麻烦though.Thanks为 你的那种赞赏。
什么jQuery和jQuery UI的版本是您使用? –
jQuery UI 1.8.16和jQuery v1.6.2 –
我只是想在digOpn()中显示一个确认对话框,所以你可以改变我的代码到工作区。 –