Bonjour a tous,
voici ce que j'essai de faire:
- modifier un champs quand je clic dessus Ok
- modifier la valeur de mon lien suite à la modification
et la partie JS
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 <table id="operations" cellspacing="0" cellpadding="0" class="striped"> <thead><tr> <th>Date</th> <th>Motif</th> <th>Code</th> <th>Somme / Euros</th> <th>Reste / Euros</th> <th>Relevé</th> </tr></thead> <tbody> <tr> <td class="dateOpe">En attente</td> <td>essai 1</td> <td>label 1</td> <td>758.45€</td> <td>758,45€</td> <td><a href="index.php?action=compte&id=1&operation=10&releveOperation=1&value=1" title="Relever cette opération"><span class="icon medium red" data-icon="C"></span></a> </td> </tr> <tr> <td class="dateOpe">10/11/2012</td> <td>Essai 2</td> <td>Label 2</td> <td>-71.04€</td> <td>687,41€</td> <td><a href="index.php?action=compte&id=1&operation=11&releveOperation=1&value=1" title="Relever cette opération"><span class="icon medium red" data-icon="C"></span></a> </td> </tr> <table>
Je pense que je suis mal positioné dans la DOM ...
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 <script> $(function() { $( '#date' ).datepicker( $.datepicker.regional[ 'fr' ] ); }); $('td:contains("En attente")').click( function(){ var text = $(this).text(); $(this).text(''); $('<input type="text" name="date" id="date" />').appendTo($(this)).val(text).select().blur( function(){ var newText = $(this).val(); $(this).parent().text(newText).find('input:text').remove(); $(this).parent().find('a').attr('href', $(this).parent().find('a').attr('href')+"&dateOperation="+newText); /* c'est ici que ça merde*/ }); }); </script>
Merci par avance
Partager