Ajax error ) missing

hi
please need urgent help
i always have the same po*roblem with ajax $.get function
i even started a new sample webpage to test it, but always same error
this is the error shown by fireburg :slight_smile:`SyntaxError: missing ) after argument list
$.post(‘verif_login.php’, {nom : nom},success(data){
and this is my sample webpage code

<body><div>
<form >
<input type="text" id="nom" name="nom" /><br/>
<input type="text" id="pseudo" name="pseudo" /><br/>
<input type="submit" name="btn" id="bouton" value="envoyer" />
<input type="text" name="resultat" id="resultat" value="" />



</form></div>
</body>
<script type="text/javascript" src="jquery.js" ></script>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
    var noms = $("#nom").val();    
    $("#bouton").click(function()  {  
    
    $.post('verif_login.php', {nom : noms, pseudo : "ali"}, success(data){
        $("#resultat").html("<p>" + data + "</p>");
        
    });
    
    });
    
    
    
    
    
});

</script>

and to trust i didn’t have any problem with php i made sample php response without any database request
please neeed help

That doesn’t look right to me.

I think it should be

$.post('verif_login.php', {nom : noms, pseudo : "ali"}, function(data){
        $("#resultat").html("<p>" + data + "</p>");
        
    });

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.