0

I'm trying to check a checkbox on a website using vbscript,

IE.Document.getElementById("ctl32_ctl04_ctl07_divDropDown_ctl242").Checked = True

Website checkbox:

<input id="ctl32_ctl04_ctl07_divDropDown_ctl242" type="checkbox" name="ctl32$ctl04$ctl07$divDropDown$ctl242" onclick="$get('ctl32_ctl04_ctl07').control.OnValidValueClick(this, 'ctl32_ctl04_ctl07_divDropDown_ctl00');">

But I keep getting an error of "Object required: 'IE.Document.getElementById(...)'" I have used this method many times before to check boxes in different websites, but this one in particular I'm having a hard time. This element is inside a dropdown menu.

Zulake
  • 149
  • 3
  • 14
  • Have you checked any of the following? (1) http://stackoverflow.com/questions/8304039/document-getelementbyid-object-required (2) http://stackoverflow.com/questions/14247439/ie-9-error-getelementbyid-object-required (3) http://stackoverflow.com/questions/18430429/vbs-website-login-script-object-required-error. There's loads more links to try with [this google search](https://www.google.co.uk/search?q=Object+required%3A+%27IE.Document.getElementById+vbscript&oq=Object+required%3A+%27IE.Document.getElementById+vbscript&aqs=chrome..69i57.3743j0j7&sourceid=chrome&es_sm=122&ie=UTF-8). – djikay Aug 04 '14 at 20:18
  • Hi djikay, Thanks for your response but (1) innerHTML does not work. (2) You can verify from my code above the ID I'm calling is the correct name. (3) I tried getElementsByName and using ctl32$ctl04$ctl07$divDropDown$ctl242, but it also didn't work. :( – Zulake Aug 05 '14 at 14:31

0 Answers0