fetch_customer_info.php
<button id=printToTextarea>Get to box</button>
text.php
<?php
require_once('fetch_customer_info.php');
?>
<script type="text/javascript">
$("#printToTextarea").on("click", function () {alert(3);
$(this).next("#textInput").focus();
});
</script>
<div id="projectNameDiv">
<label for="textInput">Text to Print:</label><br/>
<textarea name="textInput" id="textInput" rows='3' cols='40'></textarea>
</div>
When I click the button 'Get to box', no alert message appearing. I need to focus text area.