jQuery modal-dialog , buttons, 重定向到 link, 在 jquery/js 中传递 PH
jquery modal-dialog , buttons, redirecting to link, passing php variables in jquery/js
$("#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属性,但没有成功。
buttons: {
'Delete': function() {
**var linkToRedirect = document.getElementById('completeLink').value;
window.location = linkToRedirect;**
$(this).dialog('close');
},
并在表格上:
<input type='hidden' name='completeLink' id='completeLink'
value='delete_content.php?&id=$idC' />
相关文章:
- 可以't让我的if语句处理js中的html表单输入
- 使用agility.js进行页面布局和合成
- 使用Clipboard.js复制span文本
- 使用JS如何动态更改显示的html文件中的文本背景颜色
- 强制模板刷新ember.js
- 如何编写HTML输入的JS内联
- Angular JS IE9 Hashbang url rewriting
- 使用JS将数组转换为json对象
- Node.js v6.2.0类扩展不是函数错误
- 当js函数's已执行
- 要求未定义JS回调参数
- 在自定义mean.io包中使用angular-chart.js作为依赖项
- 无法在数据endVal中设置值=“”;{{ucount}}”;使用Angular JS的CountUp
- 如何从Java/scala调用js美化程序
- 如何更改<svg>标记为<img>用js标记
- 如何使用 node.js 比较两个 json 数组
- chrome扩展:尽管运行了at:documentidle,js脚本还是过早启动
- 节点Js:How to catch a“;没有这样的文件或目录“;读取线模块出错
- Selectize.js:如何对整数值的选项进行排序
- jQuery modal-dialog , buttons, 重定向到 link, 在 jquery/js 中传递 PH