Bonjour,
je veux savoir comment je peux recuperer un id avec ajax,j'ai integrer un menu en jquery et je veux quand je clique sur le nom du projet je recuperer id de ce projet et je me redirige vers un autre onglet (ajout organisation) pour affecter des organisations a ce projet sans jquery j'arrive a faire tt ca mais mnt nn.
page twig
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| {% extends "::base.html.twig" %}
{% block stylesheets %}
<link rel="stylesheet" href="{{ asset('bundles/myappavv/css/jquery-ui-1.8.20.custom.css') }}" type="text/css" media="all" />
{% endblock %}
{% block javascripts %}
<script type="text/javascript" src="{{ asset('bundles/myappavv/js/jquery-1.7.2.min.js')}}"></script>
<script type="text/javascript" src="{{ asset('bundles/myappavv/js/jquery-ui-1.8.20.custom.min.js')}}"></script>
<script type="text/javascript">
$(function(){
// Accordion
$("#accordion").accordion({ header: "h3" });
// Tabs
$('#tabs').tabs();
});
</script>
{% endblock %}
{% block body %}
<table>
<tr style="color: fuchsia;font-size: 18px;direction: right;">
<td>{{ app.user.username }}</td><td> | </td>
<td><a href="{{ path('fos_user_security_logout') }}">Déconnexion</a></td>
</tr></table>
<div id="tabs">
<ul>
<li><a href="{{ path('MyAppAvvBundle_list') }}">liste avv</a></li>
<li><a href="{{ path('MyAppAvvBundle_ajout') }}">ajout avv</a></li>
<li><a href="{{ path('MyAppAvvBundle_organisation') }}"></a></li>
<li><a href="{{ path('MyAppAvvBundle_listorg') }}">Liste des Organisation</a></li>
<li><a href="{{ path('MyAppAvvBundle_ref') }}">RM3</a></li>
<li><a href=" ">RSKM3</a></li>
<li><a href=" ">Le chiffrage</a></li>
</ul>
<div id="MyAppAvvBundle_list"></div>
<div id="MyAppAvvBundle_ajout"></div>
<div id="MyAppAvvBundle_listorg"></div>
<div id="MyAppAvvBundle_ref"></div>
<div id=" "></div>
<div id=" "></div>
{% block content %}
{% endblock %}
</div>
{% endblock %} |
le lien sans jquery
<li><a href="{{ path('MyAppAvvBundle_organisation',{'id':a.id}) }}"></a></li>
organisation
1 2 3 4 5 6 7
| <form method="post" {{ form_enctype(form) }}>
{{ form_widget(form) }}
<input type="submit" />
</form> |
Merci d'avance
Partager