我创建了两个带有创建用户和批处理的超链接
如果一个超级点击弹出窗口正在打开,同时不应打开其他超链接(批量)
(目前两者正在开放)
请告诉我如何解决这个问题?
请看我的代码:
var create = dojo.create("div",{
id:"create_links",
className:"iconRow1",
innerHTML:"<a class='popupLink' href='javascript:openDialog()'>Create User</a> <span>|</span><a href='javascript:openFileDialog()'>Batch </a>"
}
function openDialog() {
dojo.byId('create_links').disabled=true;
$("#create_links").addClass("disabled");
// some code
}
其他超链接代码是
function openFileDialog() {
$("#fileuploadfun").attr('title',"Batch");
$( "#fileuploadfun" ).dialog({ position: 'center' , zIndex: 0, width: 500, show: 'slide', resizable:'false' });
}
Currently the Dialog bOxes are created in this way :(This is for Batch)
$("#fileuploadfun").attr('title',"Batch ");
$( "#fileuploadfun" ).dialog({ position: 'center' , zIndex: 0, width: 500, show: 'slide', resizable:'false' });
以这种方式创建用户对话框:
$( "#createUserDialog" ).dialog( "option", "title", 'Create User' );
$( "#createUserDialog" ).dialog("open");
答案 0 :(得分:0)
无法通过任何属性禁用链接。禁用任何链接的方法是简单地删除onclick或用#或javascript:void(0)替换href以避免跳转到页面顶部。