<form method="post" action="load_statements.php?action=load" id="loadForm"
enctype="multipart/form-data">
das ist meine Form, die mir gut aussieht. in dieser Form, habe ich diese Schaltfläche:
<input type="button" name="submit" id="submit" value="Submit" onclick="confirmSubmit()" class="smallGreenButton" />
hier ist die Funktion, es nennt.
function confirmSubmit() {
// get the number of statements that are matched
$.post(
"load_statements.php?action=checkForReplace",
{
statementType : $("#statementType").val(),
year : $("#year").val()
},
function(data) {
if(data['alreadyExists']) {
if(confirm("Statements already exist for " + $("#statementType").html() + " " + $("#year").val() +
". Are you sure you want to load more statements with these settings? (Note: All duplicate files will be replaced)"
)) {
$("#loadForm").submit();
}
} else {
$("#loadForm").submit();
}
}, "json"
);
}
und wie Sie sehen können, ist es $("#loadForm").submit();
nennt, aber die Form der Einreichung nicht (dh die Seite ist nicht erfrischend). Warum das?
danke!
Haben Sie einen Haltepunkt erreicht, wenn Sie es ausdrückte auf den submit call? – mackenir
Ja, es läuft, aber das Formular aus irgendeinem Grund nicht tatsächlich übermittelt. – Garrett