Looking for help with this code snippet:
function remove_name(i) {
var phase_name = document.getElementById('phase_rates_phase_name' + '-c' + i).value;
$("select#payer_contract option[value='Phase 3']").remove();
}
This code works correctly to remove the 'Phase 3' item from the dropdown. However, I would like to be able to remove a variable instead. Is there a way to achieve something similar to this?
$("select#payer_contract option[value='phase_name']").remove();
Any suggestions or solutions would be greatly appreciated.