on-internet
← Community

getting values from a modal using jquery

Stack Overflow ·

-----------SOLVED----------- thanks for taking the time to help me. i managed to make it work now. i think the problem was my negligence. i have to add the getVal on my modal like so id="modal_"getVal. it was calling the wrong modal, thats why the input box returns empty. Im very sorry for this and I appreciate the help people do. thank you i have a simple modal which contains a textbox and button. <input type="text" class="form-control" id="textb" val_A="1"> <button type="button" id="but"> submit </button> i want to get the textbox .val() and the attributes val_A upon button click $(document)

Comments

Sign in or sign up to comment and upvote.

No comments yet.