Requête AJAX non exécutée
Bonjour a tous,
Je travail sur un site en MVC3.
J'ai plusieur froms dans ma page.
Ils sont différenciés par un id different.
Losrque j'en valide un je passe dans cette fonction:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| function SendPost(id) {
AllInputs = $("input[class^='autoC instance-" + id + "']");
CheckBox = document.getElementById("CheckBox" + id);
jQuery.each(AllInputs, function () {
if (this.value != "")
Agents.push(this.value);
});
if (Agents.lenght == 0)
Agents.push("");
alert("Aha ?"); // Executé
$.ajax({
type: "POST",
cache: false,
url: "Home/DetailBot",
data: { agents: Agents, id: id, Night: CheckBox.checked }
});
alert("Oho ?"); // Non executé
} |
La requete ajax ne se fait pas.
Merci pour toute aide.