I'm trying to figure out how to code a click event to automatically occur after I
1. select an option from a dropdown.
2. depending on the option, the text of the option gets set as the value of a textbox.
2. set focus into the textbox.
What is working is the textbox value gets set and the cursor gets positioned into the textbox at the end of the text. But I can't figure out how to automate a click event to get the cursor to move to the next field.
I tried using focusin as show below...
<script>
jQuery(document).ready(function(){
jQuery("#textbox").focusin(function() {
jQuery("#textbox").trigger('click');
});
});
</script>
And when I include an alert, in the function, the alert popups to show that I'm in the focusin function, but I can't seem to get the click to work. And the alert just keeps re-popping up.