JQuery Ajax call failure from a clickable image
I had a first post "
But my work of this day helps me to localize the origin of the problem.
I made a very, very small project with a simple form
one input field (in fact it is not used)
one image (clickable)
one button
- <input type="text" id="setNom" value="admin"/>
- <input type="image" id="validNom1"
- src="ok-16.png" alt="valider" title="valider"' />
- <input type="button" id="validNom2" value="OK" />
<validNom1> and <validNom2> are both calling the same javascript function containig a JQuery Ajax call.
Both find the function (Control with javascript debugger in firefox).
But the
JQuery Ajax call result is
- error for the image
- success for the button
Can somebody help me to understand the problem ????The whole javascript is there (and the whole project is in the zip attachement
- function ResultatNom(){
- alert("Resultat correct");
- }
- function ControleUtilisateur(){
- var urls = $('#urlRacine').val();
- $.ajax({
- type: 'POST',
- url: 'ControleLogin.php',
- dataType: 'json',
- data: "champ=nom",
- success: ResultatNom,
- error: function () {
- window.alert('Erreur de transmission au serveur');
- }
- });
- }
- $(document).ready(function() {
- $('#validNom1').click(ControleUtilisateur);
- $('#validNom2').click(ControleUtilisateur);
- });