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:
La requete ajax ne se fait pas.
Code js : Sélectionner tout - Visualiser dans une fenêtre à part
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é }
Merci pour toute aide.
Partager