Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 688

Update Document reference for Internet Explorer

$
0
0
So I'm writing a script in Visual basics to fill out an online form. I'm able to fill out the first form, but after submitting the first the page refreshes with a new form but the internet explorer object is stuck on the previous html. I think if i call Location.reload() then it will refresh the html document, but I'm unable to figure out how to call it.

Dim coName As String
Dim usrName As String
Dim pwd As String

Dim wb As SHDocVw.InternetExplorer

Set wb = New SHDocVw.InternetExplorer
wb.Visible = True
wb.Navigate("*************")
While wb.Busy
Wait 0.100
Wend

wb.Document.getElementById("txt_CID").Value = "*****"
wb.Document.getElementById("txt_UID").Value = "**********"
wb.Document.getElementById("txt_PWD").Value = "*****"
wb.Document.getElementById("btnLogin").Click()
wb.Visible = True

Wait 2 (..............New Page loads here..............)

wb.Document.getElementById("ContentPlaceHolder1_ddlTechID").Value = "IP3M-01"


The last line gives the error: "not an object reference" because the document hasn't updated.

Sadly, I must use vbscript so I need to figure out how to make this work.

Viewing all articles
Browse latest Browse all 688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>