Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically click on 'Log In' Button on Web Page

Status
Not open for further replies.

otheracco

Technical User
Feb 4, 2008
15
US
Hello, I'm trying to find a way to automatically click on a button on a web page.
As the title says, it's the 'login' button.

Is there a way to activate web buttons with vbscript?

Thanks!
 
Look at HTML DOM for this....if the button has an ID you would be able to do something like

window.document.getElementByID("LoginButtonID").Click()

It really depends on the page. What have you tried so far? If nothing, look for InternetExplorer.Application

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
I'm a bit of a noob and haven't tried anything so far.
I can see from the source code that the form does have an id

Here's a bit of the page code.

<body marginheight="0" marginwidth="0">
<form name="Login" method="post" action="Login.aspx?cID=8666&amp;lng=en-US" id="Login">
<input type="hidden" name="__PageDirty" value="False" />
<input type="hidden" name="__PageDirtyMsg" value="Changes have been made but not saved.\nYour changes will be lost if you continue.\n\nDo you wish to continue?" />
<input type="hidden" name="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" value="" />
<input type="hidden" name="__VIEWSTATE" value="dDwyMDA5Njg3OTU3O3Q8cDxsPGNJRDs+O2w8aTw4NjY2Pjs+PjtsPGk8MD47PjtsPHQ8O2w8aTwxPjtpPDI+O2k8Nz47aTw4PjtpPDEwPjtpPDE0Pjs+O2w8dDxwPHA8bDxUZXh0Oz47bDxMb2dpbjs+Pjs+Ozs+O3Q8cDxwPGw8VGV4dDs+O2w8ZXpMYWJvck1hbmFnZXIgV2ViIENsb2NraW5nOz4+Oz47Oz47dDxwPHA8bDxUZXh0Oz47bDxDaGFuZ2UgQ2xpZW50Oz4+O3A8bDxPbkNsaWNrOz47bDxldmVudC5jYW5jZWxCdWJibGU9dHJ1ZVw7Oz4+Pjs7Pjt0PHA8cDxsPFRleHQ7PjtsPFRDU3BpbmU7Pj47Pjs7Pjt0PHA8cDxsPE1heExlbmd0aDs+O2w8aTwyNT47Pj47cDxsPG9ua2V5ZG93bjs+O2w8ZG9TdWJtaXQoZXZlbnQsJ2J0bkxvZ2luX2FjdGl2ZScpXDs7Pj4+Ozs+O3Q8O2w8aTwxPjs+O2w8dDxwPHA8bDxUZXh0Oz47bDxNZXNzYWdlczs+Pjs+Ozs+Oz4+Oz4+Oz4+Oz5Oh8FyOYZHjaBXeIBL5F1hoA6JnQ==" />

<script language="javascript" type="text/javascript">
<!--
function __doPostBack(eventTarget, eventArgument) {
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top