onSubmit avec 2 fonctions JS
Bonjour,
J'ai un soucis avec ma mon POST. Mon onsubmit doit appeler 2 fonctions JS. Quand j'en met une seule ça fonctionne mais pas avec les 2 (mes 2 fonctions JS fonctionne parfaitement).
Ces 2 fonctions return soir false soit true en fonction du résultat.
Voila comment je m'y prend :
Code:
print('<form method = "POST" action = "vitam-payementCB" onSubmit = "javascript:return (checkCGV_Charge() && return testMontant('.(150-$user->getSolde()).'));">');
Comme vous l'avez compris mes 2 fonctions sont checkCGV_Charge() et testMontant(montant).
J'ai eyyayé plusieures sytaxe mais j'ai jamais réussi a y faire marcher !
Par exe :
Code:
print('<form method = "POST" action = "vitam-payementCB" onSubmit = "return (checkCGV_Charge(); return testMontant('.(150-$user->getSolde()).');">');
Comment faire ?
Merci