To focus on the textbox when bootstrap pop-up is open
To focus on the textbox when a Bootstrap pop-up is open, you can use JavaScript to set the focus on the textbox element. Here's an example of how you can achieve this:
$('#myModal').on('shown.bs.modal', function () {
$('#myInput').trigger('focus')
})
In this example, #myModal
is the ID of the Bootstrap modal, and #myInput
is the ID of the textbox element inside the modal. The shown.bs.modal
event is triggered when the modal is shown, and the trigger('focus')
function sets the focus on the textbox element.
Make sure to replace #myModal
and #myInput
with the actual IDs of your modal and textbox elements.
I hope this helps! Let me know if you have any further questions.