$("#modal_confirmation").dialog({
autoOpen: false,
bgiframe: true,
resizable: true,
width:500,
modal: true,
overlay: {
backgroundColor: '#000',
opacity: 0.5
},
buttons: {
'Delete': function() {
//HERE I HAVE TO PUT A LINK TO GO TO A URL*
$(this).dialog('close');
},
'Cancel': function() {
$(this).dialog('close');
}
}
});
该链接必须传递 php 变量。我试过类似的东西:'删除':
函数() { window.location = "delete_content?id=" $idC
并且
window.location = "delete_content?id=" <?php echo $idC;?>
<a class='btn_no_text btn ui-state-default ui-corner-all tooltip modal_confirmation_link' title='Eliminar' href=''>
<span class='ui-icon ui-icon-circle-close'></span>
</a>
当您单击该链接时,它会打开一个模型对话框以及我在上面显示的按钮。所以总结一下,当你点击删除它应该去一个看起来像这样的链接:
delete_content.php?id=SOME NUMBER.
我也尝试访问 html/php 上的 href 属性,但没有成功。