Thomas Meinike: onSubmit Abfrage geht nicht

Beitrag lesen

Hallo,

Kannst du mir diese Funktion nicht anpassen?

function send () {
  document.tableform.forceaction.value = "send";
  document.tableform.action="crt.jsp?id=<%=article.getId() %> ";
  document.tableform.method="post";
  document.tableform.submit();
}

true = senden
false = nichts machen

function send () {
  if(confirm("Wollen Sie wirklich diesen Artikel senden?"))
  {
    document.tableform.forceaction.value = "send";
    document.tableform.action="crt.jsp?id=<%=article.getId() %> ";
    document.tableform.method="post";
    document.tableform.submit();
  }
}

MfG, Thomas