I want to remove option from a selected dropdown, for this I've made removeValue() function but is not working as expected.
I debug the code and found that [value=removeid]. Var removeid is not working as expected here.
JavaScript function removeValue
function removeValue() {
var removeid = $('#transaction_user_account_id').val()
alert(removeid); // I am getting my ID here
$("#transaction_transfer_account_id option[value=removeid]").remove();
};
If I give a constant value like value="21", then is working properly but when I assign my Var removeid to option[Value=removeid]. It stops working.
How can I make this work?