Vba - Handle Javascript Pop Up With Ie Automation
I have automated my Internet Explorer to fill out a lot of information throughout the webform. When my VBA script clicks the transfer htmlelement it runs the Javascript which opens
Solution 1:
You can try something like this:
Dim el, f
SetHTMLDoc= ie.document
Setel=HTMLDoc.getElementById("ctl00_PlaceHolderMain_TestControl1_" & _
"CertificateSearchControl_cmdTransfer")
f = el.onclickf= Replace(f, "return confirmOnTransfer();", "")
el.onclick = f
el.click
Part 2 (4/1/2015):
Dim el2
'get the div containing the menu optionsSet el2 = HTMLDoc.getElementById( _
"ctl00_PlaceHolderMain_TestControl1_Certificate" & _
"SearchControl_CertificateBundleReport_ctl05_ctl04_ctl00_Menu")
'click one of the contained links in that div
el2.getElementsByTagName("a")(1)
Post a Comment for "Vba - Handle Javascript Pop Up With Ie Automation"