Perdre la sélection après submit
bonsoir,
voici mon code:
Code:
1 2 3 4 5 6 7 8 9 10
| function remplir_profil(system) {
var h1;
$.post('data.xml', function(data) {
$('select option').remove();
$(data).find("Data").children("<?= $_SESSION['sup-dot-drt']?>").children(system).children("name").each(function(i, item) {
h1 = $(item).text();
$('#profil2').append('<option value="' + h1 + '">' + h1 + '</option>');
});
});
} |
Code:
1 2
| <select class="form-control editable" id="profil2" name="profil22" >
</select> |
mon problème est: quand je rafraîchis ma page je perds la sélection de cette liste