title: Website login not recognizing getelementbyID method
body: <p>I'm relatively new to VBA.  I'm loving it.  I need to login to web pages and navigate a few pages.  I've been calling the login information easily with this* with no problems.  I came to a new website and it refuses to accept my input.  I've had to modify my code to this**.  Furthermore, when I say .elements("password") It enters the password in the URL line.  Even after I told it to use the correct ID.  What's REALLY strange is if you step through it, it won't work. It only works if you're running the macro. </p>
  
  <p>What I do know is that there are some Javascript validation procedures so I can't just pass the value of the login, I have to type it in.  Hence the sendkeys.  What I don't get is why it will find the User ID box to place the login information, but it goes sideways when it reads the next line saying "put the password here."</p>
  
  <p>I don't know VBA well enough to ask the right question. It should be something easy. </p>
  
  <p>*</p>
  
  <pre><code>With ieDoc
      .getElementById("UsernameIDvar").Value = LoginVal
      .getElementById("PasswordIDvar").Value = PassVal
      .all("loginbuttonvar").Click
  End With
  </code></pre>
  
  <p>**</p>
  
  <pre><code>ieDoc is Internetexplorer.Application.Documents
  LoginVal and PassVal is a string pulled from an excel spreadsheet
  
  With ieDoc.forms("lqLogin")
          .elements("user").Click
          SendKeys (LoginVal), True
          .elements("password").Click
          SendKeys (PassVal), True
          .submit
  End With
  </code></pre>
  
  <p>Website Code:</p>
  
  <pre><code>&lt;form id="lqLogin" name="lqLogin" method="post" action="" &gt;
   &lt;fieldset&gt;
   &lt;legend&gt;Enter Login Information&lt;/legend&gt;
    &lt;table class="ctl_loginBox"&gt;
     &lt;tbody&gt;
      &lt;tr&gt;
       &lt;td&gt;&lt;label for="User Id"&gt;User ID&lt;/label&gt; &lt;br&gt;
       &lt;input type="text" value="" maxlength="50" size="28"
        id="user" name="user" disabled="disabled"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
       &lt;td&gt;&lt;label for="Password"&gt;Password&lt;/label&gt;&lt;br&gt;
       &lt;input type="password" value="" maxlength="50" size="28"
        id="password" name="password"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
       &lt;td&gt;&lt;div class="ctl_btnPos"&gt;&lt;a href="#bmg_msgContainer"
        class="ctl_btn ctl_btnLogin lqLoginBtn"&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;
        Login&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;/tr&gt;
     &lt;/tbody&gt;
    &lt;/table&gt;
   &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>