我有一个jQuery的对话框,嵌套表格这样的嵌套形式:jQuery的对话具有提交问题
<!-- Store Location Dialog -->
<div id = "changeDialog">
<form id = "form" method = "post" action = "Default.aspx" \>
<input type = "text" id = "changeText" name = "changeLocation" />
<input type = "button" id = "changeStoreDialogSubmit" value = "" onclick = "dialogSubmitForm()"/>
</form>
</div>
有按钮被按下时可能发生的两个实例。一个实例需要一个页面加载,另一个不会。我有非页面加载实例正常工作,但另一个不是。这里是dialogSubmitForm()
方法我:
function dialogSubmitForm() {
if (!placeHolderVisibility) {
$('#changeStoreDialogSubmit').submit();
}
else/
{
//Working code
}
}
这里是对话:
function createDialog() {
//Creates a new dialog
$('#changeDialog').dialog({
resizable: false,
title: '<span class="ui-icon ui-icon-home"></span> Enter Info',
});
}
当我测试的页面,我可以看到$('#changeStoreDialogSubmit').submit();
击中,但从来没有一个页面加载。为什么会发生?
是'#changeStoreDialogSubmit'按钮还是表单? – 2011-04-20 18:31:04
虽然我在那里添加了html的代码。让我编辑它 – 2011-04-20 18:33:49
这是一个按钮,虽然 – 2011-04-20 18:34:29