-4

           $(document).ready(function(){
               $( "#add1" ).click(function(){

                   var nom1 = $('#nom1').val();
                   var cont1 = $('#con1').val();
                   var part1 = $('#par1').val();
                   var coup1 = $('#coup1').val();


                       $.ajax({
                           type:'POST',
                           data:{nom1:nom1,con1:con1,par1:part1,coup1:coup1},
                           url:'{{path('equipe_add')}}'



                       });


               });
               return false;
           });

   </script>

Can you help me ,I got uncaught rangeerror maximum call stack size exceeded on each time i click.

  • Hi and welcome to stackoverflow. This page https://stackoverflow.com/help/how-to-ask is a really great resource you may want to read over before submitting a question. If you follow these guidelines people in the community will be able to help you better. – mike Apr 03 '18 at 22:43

2 Answers2

0

I have to write correctly where is your ajax:

this:

url:'{{path('equipe_add')}}'

to

url:"{{path('equipe_add')}}"

Syntax error in twig

Imanali Mamadiev
  • 2,604
  • 2
  • 15
  • 23
0

I am not sure but try this :

var url = '{{path('equipe_add')}}';

and than in the ajax call :

$.ajax({
        type:'POST',
        data:{nom1:nom1,con1:con1,par1:part1,coup1:coup1},
        url : url
 });
Houssein Zouari
  • 712
  • 6
  • 18