Rouven: confirm sendet bei Abbrechen trotzdem

Beitrag lesen

Hello,

if(document.forms[i].lastChild.previousSibling.value==1)
  {alert(document.forms[i].lastChild.previousSibling.value);}
  else
  {alert(document.forms[i].lastChild.previousSibling.value);}
}

du hast den Hinweis immer noch nicht verstanden: Dein Code (im Ausgangsposting) sagt: Wenn der Wert 1 ist, dann gebe (return) den Wert des confirm-Dialogs zurück. <- Punkt. Schluss. Du sagst nirgendwo, was zurückgegeben werden soll, wenn der Wert nicht 1 ist.

Kannst Du mir sagen wo Deine Vermutung hinzielt, vielleicht finde ich ja dann den Fehler?

der Hauptfehler wurde im anderen Diskussionsfaden geklärt und bezieht sich auf die Anbringung im onsubmit. Das hier klärt lediglich die weiteren Fälle ab.

MfG
Rouven

--
-------------------
He is entertaining both out of the car and in the car because if you tell him that a corner is almost flat then he is the guy who is going to try to take it flat even if it means shunting it the other side of it, he will come with the data and say 'hey, I may have crashed and destroyed the car, but I was flat-out'. That is an interesting quality that he has!  --  Team Member on Jacques Villeneuve