title: Manipulating Data on 2nd page after button was triggered on 1st page via Console Browser
body: <p>I've been trying to manipulate data on the 2nd page after triggering button onclick() on 1st page. Is there a way in javascript or jquery to wait for the 2nd page to load first before calling an element on it? All of the commands are just being ran on browser console by the way.</p>
  
  <p>I tried to use a setTimeout function to wait for the 2nd page to load and change a combobox's value but it didn't work.</p>
  
  <pre><code>//actions done on first page
  document.getElementsByName("txtAcctName")[0].value = "ABC";
  document.getElementsByName("txtId")[0].value = "0300275777";
  document.getElementsByName("Action")[0].click();/*button click trigger which directs to 2nd page*/
  
  setTimeout(function(){/*action to be done on 2nd page*/
      document.getElementsByName("cbomonthyear")[0].selectedIndex = 1;
  },1000);
  </code></pre>