jquery simplemodal 在 POST 后重定向到父页面

标签 jquery post simplemodal

我正在使用最优秀的 SimpleModal jQuery 插件 (http://www.ericmmartin.com/projects/simplemodal/)。

我的索引页面有一个简单的模式打开,其中显示用户必须为特定项目填写的表单。成功提交表单后,模态窗口会重新加载 Index() - 这意味着我的模态以及父 View 中都有一个 Index()。

有没有办法可以重新聚焦页面以重新加载我的父索引,而不是在模式窗口内重新加载?

最佳答案

你可以这样做:

在模态中: ...

document.forms[0].target = window.parent.name;
document.forms[0].submit();

在父 View 中:

$(document).ready(function() {
        window.name = "alumnoIncidencias";
});

希望对您有帮助!

关于jquery simplemodal 在 POST 后重定向到父页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10535532/

相关文章:

forms - Golang html GET 表单方法值未被填充

iframe - SimpleModal 在 IE 9 中不起作用(在 Iframe 内)

javascript - 简单模式不滚动背景 <body>

javascript - jquery ajax问题。 .done() 函数中的奇怪行为

jquery - 为什么 DataTables 中的 columns.render 选项停止处理多列?

python - python 中的 HTTP POST Curl

json - 是否有任何在线工具可以使用 json 有效负载进行 POST 请求以进行 pretty-print ?

javascript - 如何在 listView 编辑操作中使用 SimpleModal

javascript - jquery datepicker 不能在 IE7 和 IE8 中工作

javascript - 社交媒体分享