Link to home
Start Free TrialLog in
Avatar of esak2000
esak2000

asked on

Foxpro InternetExplorer.Application object

I use the InternetExplorer.Application object to automatically sign into Yahoo

The following code has been working for a few year on Internet Explorer version 8,
but when I upgraded to version 9 it no longer works. The user name and password fill the text boxes, but the submit button doesn't 'click' to submit the form. I also tried oIE.Document.login_form.click which until now also works, but for Internet Explorer 9 and above, it doesn't:

oIE.Document.login_form.username.value="myUserName"   

 oIE.Document.login_form.passwd.value="myPassword"

oIE.Document.login_form.submit

Open in new window

Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

You have to look at the login_form HTML code and check the button name under IE 9. Then you should call the Click method of the button:

oIE.Document.login_form.submit.Click()

BTW, to store passwords in the app code isn't good security practice. Users should fill passwords manually and then press the appropriate button.
Avatar of esak2000
esak2000

ASKER

As expressed in my original post, I also tried the click method, but that didn't work either.
Thank you for the best practice comment.
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try this:

oIE.Document.login_form.item(".save").click("")

and you may play with Click parameters probably.