如何通过iframe以post方式提交form表单
1个回答
展开全部
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active">
<a>配置流程</a>
</li>
<li>
<a id="configComponentLink" href="$configComponentLink?serviceId=">配置组件</a>
</li>
</ul>
<form id="bpmnForm" class="form-inline" action="$tpgPlatformAddress/serviceorchestration/doPost.xhtm" method="post" target="bpmnSaveTarget">
<input type="hidden" name="action" value="/serviceorchestration/ProcessAction" />
<input type="hidden" name="event_submit_doSaveOrUpdateFlowByAjax" value="y" />
<input type="hidden" name="serviceId" id="serviceId" />
<input type="hidden" name="context" id="context" />
<input type="hidden" name="callback" value="parent.onSavedProcess">
<div class="form-inline" style="margin: 18px 0">
<label for="currentServiceInfo" class="control-label">所属集成服务:</label>
<input readonly="readonly" type="text" id="currentServiceInfo" class="form-control" value="" style="min-width:400px" />
<button type="button" id="saveProcess" class="btn btn-primary" style="margin-left:10px">保存流程</button>
</div>
<div class="hidden">
<iframe name="bpmnSaveTarget" id="bpmnSaveTarget"></iframe>
</div>
</form>
</div>
</div>
</div>
<script src="$homeModule.setTarget('assets/js/jquery.js')"></script>
<script>
function onSavedProcess(response) {
if (response.success) {
toast.success("保存成功,正在刷新....");
setTimeout(function () {
window.location.reload();
}, 1200)
} else {
toastr.error(decodeURI(response.errMsg));
}
}
function saveProcessData(context) {
$("#bpmnForm").submit();
}
</script>
<script type="text/javascript">
</script>
<div class="panel panel-default">
<div class="panel-body">
<ul class="nav nav-tabs">
<li class="active">
<a>配置流程</a>
</li>
<li>
<a id="configComponentLink" href="$configComponentLink?serviceId=">配置组件</a>
</li>
</ul>
<form id="bpmnForm" class="form-inline" action="$tpgPlatformAddress/serviceorchestration/doPost.xhtm" method="post" target="bpmnSaveTarget">
<input type="hidden" name="action" value="/serviceorchestration/ProcessAction" />
<input type="hidden" name="event_submit_doSaveOrUpdateFlowByAjax" value="y" />
<input type="hidden" name="serviceId" id="serviceId" />
<input type="hidden" name="context" id="context" />
<input type="hidden" name="callback" value="parent.onSavedProcess">
<div class="form-inline" style="margin: 18px 0">
<label for="currentServiceInfo" class="control-label">所属集成服务:</label>
<input readonly="readonly" type="text" id="currentServiceInfo" class="form-control" value="" style="min-width:400px" />
<button type="button" id="saveProcess" class="btn btn-primary" style="margin-left:10px">保存流程</button>
</div>
<div class="hidden">
<iframe name="bpmnSaveTarget" id="bpmnSaveTarget"></iframe>
</div>
</form>
</div>
</div>
</div>
<script src="$homeModule.setTarget('assets/js/jquery.js')"></script>
<script>
function onSavedProcess(response) {
if (response.success) {
toast.success("保存成功,正在刷新....");
setTimeout(function () {
window.location.reload();
}, 1200)
} else {
toastr.error(decodeURI(response.errMsg));
}
}
function saveProcessData(context) {
$("#bpmnForm").submit();
}
</script>
<script type="text/javascript">
</script>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询