Hey I have a little issue with jQuery
I want to have information from the select
I don't know how i can do this in jQuery so i did a other thing but the teacher said me to change this
<select class="submit-status"
onchange="changeStatusAdmin(jQuery(this))"
name="statusOption" id="status-option">
<?php
//Liste deroulante pour les statuts
foreach($allStatus as $status){
$statusName = utf8_encode($status->getStatus());
if($status->getId()
== $suggestion->getStatusId()){
$statusSelected = "selected = selected";
}
else{
$statusSelected = '';
}?>
<option value="<?php echo $status->getId();?>"
<?php echo $statusSelected; ?>>
<?php echo $statusName; ?>
</option>
<?php } ?>
</select>
I want to get the variable $statusName in jQuery but i can't change the value
And here is my jQuery code
var status = item.parents(".idea-meta").find(".submit-status").val()
if(status == 2){
status = "En attente";
}
if(status == 3){
status = "Refusée";
}
if(status == 4){
status = "Débutée";
}
if(status == 5){
status = "Planifiée";
}
if(status == 6){
status = "Terminée";
}
Sry for my bad english and thanks in advance