title: Using VBscript to interact with form on web page and firing JavaScript events
body: <p>I've search for 2 days now but can't find a solution.</p>
  
  <p>Where's what I'm trying to do
  - run a VBScript to open a web page with a form
  - Auto fill some data and click the submit button</p>
  
  <p>I have the script doing this just fine, however, there is a 'drop down' select box which displays other form options depending on which option is selected in the drop down, so this drop down box has to be triggered, but when I use VBScript to set the selected value in this drop down, it doesn't seem to be triggering the selection and firing the change event, so the associated options are not shown.</p>
  
  <p>I hope that make sense?</p>
  
  <p>Here's my code</p>
  
  <pre><code>Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
  IE.Visible = True
  IE.Navigate "https://www.somepage.com/form"
  Set e =IE.Document.getElementById("selectOptions")
  e.SelectedIndex = 4
  </code></pre>
  
  <p>I tried adding </p>
  
  <pre><code>IE.Document.getElementById("carrier").focus()
  IE.Document.getElementById("carrier").blur()
  </code></pre>
  
  <p>but it didn't help.</p>