Question

Found answer to issue - must use web.Document.getElementById("password").Value = strOldPassword

I have a VB6 application that is supposed to log in to a website. It worked at one time but hasn't been run in years and now needs to be updated. I can get the username from the database and insert into the username input on the website fine, but when I get to password I get "Permission Denied" error. I assume it has to do with password fields. Anybody have a way around that?

The VB6 code that is giving me the error:

MsgBox ("need to enter password") ' This alert is shown to me
frm.Elements("password").Value = strOldPassword ' this line never executes
MsgBox ("password entered") ' this line never executes

The relevant HTML on the web page:

<input type="password" tabindex="1" class="input-xlarge" id="password" name="password"  autocomplete="off"/>
Was it helpful?

Solution

The easy way is use getElementById method:

web.Document.getElementById("password").Value = strOldPassword
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top