i have this code in my twig file:

```
<script>

function trabajoEquipos(id)
{
    var cliente = id

    $.ajax({
        dataType: "json",
        url: {{ path("work_trabajoEquipos",{id: cliente}) }},
        type: "POST",
        data: {"cliente":cliente},
        success: function(data)
        {
            $("#divajax").html(data);
        }
    })

}

```

As you can see, i want to put the var "cliente" into the URL section of the ajax, but i cant do it in this way

---

**edit**

Here is my full code as requested :

```
{% extends 'base.html.twig' %}
    {% block body %}
    {{parent()}}
    <div class="container">
    <div class="page-header">Escribe los datos del trabajo encargado por el cliente: </div>
            <div class="col-md-12">
                <div class="row well">
                       <div style="padding-left:250px; padding-right:250px;">
                        {{ form_start(form, {'attr' : { 'role' : 'form', 'novalidate' : 'novalidate'} }) }}

                         <div class="form-group">
                            {{ form_label(form.titulo) }}
                            {{ form_widget(form.titulo, {'attr': { 'class' : 'form-control', 'placeholder' : 'Nombre del trabajo' } }) }}
                            <span class="text-danger">{{ form_errors(form.titulo) }}</span>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.descripcion) }}
                            {{ form_widget(form.descripcion, {'attr': { 'class' : 'form-control', 'placeholder' : 'Descripcion del trabajo' } }) }}
                            <span class="text-danger">{{ form_errors(form.descripcion) }}</span>
                        </div>
                         <div class="form-group">
                            {{ form_label(form.fechainicio) }}
                            {{ form_widget(form.fechainicio, {'attr': { 'class' : 'form-control', 'placeholder' : '' } }) }}
                            <span class="text-danger">{{ form_errors(form.fechainicio) }}</span>
                         </div>

                         <div class="form-group">
                            {{ form_label(form.fechaentrega) }}
                            {{ form_widget(form.fechaentrega, {'attr': { 'class' : 'form-control', 'placeholder' : '' } }) }}
                            <span class="text-danger">{{ form_errors(form.fechaentrega) }}</span>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.client) }}
                            {{ form_widget(form.client, {'attr': { 'class' : 'form-control', 'onchange' : 'trabajoEquipos(this.value)' } }) }}
                            <span class="text-danger">{{ form_errors(form.client) }}</span>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.user) }}
                            {{ form_widget(form.user, {'attr': { 'class' : 'form-control', 'placeholder' : '' } }) }}
                            <span class="text-danger">{{ form_errors(form.user) }}</span>
                        </div>

                        <div class="form-group">
                            {{ form_label(form.prioridad) }}
                            {{ form_widget(form.prioridad, {'attr': { 'class' : 'form-control', 'placeholder' : '' } }) }}
                            <span class="text-danger">{{ form_errors(form.prioridad) }}</span>
                        </div>

                         <div class="checkbox">
                            {{ form_widget(form.terminado) }}<b>Terminado</b>
                            <span class="text-danger">{{ form_errors(form.terminado) }}</span>
                        </div>

                        <p>
                            {{ form_widget( form.save, { 'label' : ' CREAR TRABAJO', 'attr' : { 'class' : 'btn btn-success' } }  ) }}
                            <a class="btn btn-danger" href="{{ path('user_index')}}">VOLVER<span class="glyphicon glyphicon-menu-left"></span></a>
                        </p>
                        {{ form_end(form) }}
                        </div>
                </div>
                <div  id="divajax" class="row well">

                </div>
        </div>
    </div>
    </div>
    <script>

        function trabajoEquipos(id)
        {
            var cliente = id

            $.ajax({
                dataType: "json",
                url: {{ path("work_trabajoEquipos",{id: cliente}) }},
                type: "POST",
                data: {"cliente":cliente},
                success: function(data)
                {
                    $("#divajax").html(data);
                }
            })

        }
    </script>
{% endblock %}

```