title: Javascript - Using EventListener with Tab Key and Focus Function
body: <p>I have been searching and have not found any particular thread that addresses my issue. </p>
  
  <p>I am trying to either write an event listener or a conditional action with JavaScript that reacts when a user selects the TAB key and shifts focus to the appropriate element on screen.</p>
  
  <p>Current DIV id has focus on screen  => id="Slide14549accStr2"
  When the user selects the TAB key, I want the user's focus to immediately shift to DIV id "Titleinformation_tb". I am unable to change the TabIndex in the HTML to do this the normal way, so I am left with using javascript in some form.</p>
  
  <p>Here is what I have so far.</p>
  
  <pre><code>document.getElementById('Slide14549accStr2').addEventListener('keydown') {
    if event.keyCode == 9) {
    var elem =
      document.getElementById('Titleinformation_tb');
    $(elem).focus();
  };
  </code></pre>
  
  <p>I would appreciate any help and feedback.</p>