i am using jquery's thickbox plugin ( ver. 3) and inside it I want to place a form that will be submitted using $.post. But the form elements are not behaving as they should. For eg there is a select box
<select name="priority" id="priority">
<?php for($i = 5; $i > 0; $i--){ ?>
<!-- <input type="radio" class="star" name="priority" value="<?php echo $i ?>"> -->
<option value="<?php echo $i; ?>"><?php echo $i; if($i == 5) echo ' (lowest)'; if($i == 1)echo ' (highest)'; ?></option>
<?php } ?>
</select>
when i click on the button that calls the submit function,
function add(){
var pr = document.getElementById("priority").value;
console.log(pr);
}
it alerts only the first value ie. 5 no matter the option selected.
Please help. Is this a commonly faced problem ?