Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

using ie.document.getElementById to submit form or click logon button in vb6

Posted on 2014-02-06
10
Medium Priority
?
1,872 Views
Last Modified: 2014-02-07
how do i click on a log on button  on a webpage using vb6 ie.document.getElementById(    statement.

the button for the webpage is below.
  <button type="submit" class="LogOnButton">Log On</button>

there is also the line
<form action="/Account/LogOn" method="post">

let me know if you need more infomation
0
Comment
Question by:rjef
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 3
10 Comments
 
LVL 34

Expert Comment

by:Norie
ID: 39840866
Once you have the element you could just try it's click method.

Or if it's form you want to submit you could try something like this.

ie.document.forms(0).submit()

Open in new window


This would submit the first form on the page, if there is more than one form change 0 to get the right one.
0
 

Author Comment

by:rjef
ID: 39840868
how do i find the element?
0
 
LVL 34

Accepted Solution

by:
Norie earned 2000 total points
ID: 39840884
If you want to submit the form try the code I posted.

That should be just the same as clicking the submit/logon button.
0
Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

 

Author Comment

by:rjef
ID: 39840886
ok thanks
i will try when i get to work on friday
0
 

Author Comment

by:rjef
ID: 39841732
It worked but i had to remove the "()" on the submit

ie.document.forms(0).submit
0
 

Author Comment

by:rjef
ID: 39841772
any idea how to click on the check box from the below web site

<ol id="cabinetDocuments">
    
    <li class="line" rel="Scan_2014_02_04_12_55_04_036.pdf">        
        <div class="unit">
            <input type="checkbox" /><span class="doc-icon pdf" Title="Scan_2014_02_04_12_55_04_036.pdf">Scan_2014_02_04_12_55_04_036.pdf</span>
        </div>
        <div class="lastUnit">
            2/4/2014 1:22:04 PM
        </div>
    </li>
    
    <li class="line" rel="Scan_2014_02_04_12_53_55_486.pdf">        
        <div class="unit">
            <input type="checkbox" /><span class="doc-icon pdf" Title="Scan_2014_02_04_12_53_55_486.pdf">Scan_2014_02_04_12_53_55_486.pdf</span>
        </div>
        <div class="lastUnit">
            2/4/2014 1:20:58 PM
        </div>
    </li>

Open in new window

0
 

Author Closing Comment

by:rjef
ID: 39841963
thanks
0
 
LVL 34

Expert Comment

by:Norie
ID: 39842749
That's kind of a whole different question.:)

Might even need the URL for the site to take a look at the rest of the source code.
0
 

Author Comment

by:rjef
ID: 39842770
i can send you the source.  i put another question in for it.  send me your email address to rjef041364@yahoo.com
0
 

Author Comment

by:rjef
ID: 39842784
the question is here
http://www.experts-exchange.com/Software/Internet_Email/Web_Browsers/Q_28359188.html

but you probably need more of the source.  Email me at rjef041364@yahoo.com  with your email and i will send it.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Suggested Courses

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question