I have a bootstrap model and inside I have an input field.
<input type="text" name="quota" class="form-control" id="quotas" value="'.$storagequota.'" maxlength="20" >
Also, I have a button which when clicked calls a function so I can get the value of the input field.
function getQuota(){
quota = $("#quotas").val();
alert(quota);
}
The problem is that I cannot get the value that user typed. The weird thing is that i have another model in another page that works in the same way. Can someone help with that? Thanks in advance.
Just put the id of the modal before the id of the input
$("#registration_modal #useremail").val().trim()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With