?
Solved

Enter Data on HTML or ASP Web Page from VB

Posted on 2003-03-18
4
Medium Priority
?
139 Views
Last Modified: 2010-04-07
Is there any way of getting a handle or ??? of say a tick box on a web page, from a vb executable program.
Ie. I need to enter several tick boxes on a web page from my vb program.
I know how to get the handle of another program running but not a web page.
0
Comment
Question by:kennedymr
[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
  • 2
  • 2
4 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 8162327
You won't use a window handle to send messages to items on a webpage as they are not windows controls, they are html elements.  If you are talking about an open instance of Internet Explorer, then you have access to the DOM (Document Object Model) of the html page currently loaded inside of it, and you can manipulate it with code that would appear very similar to a scripted implementation (javascript or vbscript).  If you are talking about any browser, such as Netscape or Opera, you may be stuck using some ugly workarounds (unless they provide some sort of techniques in their respective SDKs).
0
 

Author Comment

by:kennedymr
ID: 8162575
I would be using Inernet Explorer.
Sounds pretty complicated!!!!
May have to give this idea a miss.
0
 
LVL 28

Accepted Solution

by:
AzraSound earned 500 total points
ID: 8163950
Example, set a reference to Microsoft Internet Controls


Dim shWin As New ShellWindows
Dim IE As InternetExplorer


For Each IE In shWin
    If IE.LocationURL = "http://www.site.com" Then
        'you now know the instance of IE to target and set values for
        IE.Document.all("chkBox").checked = True
    End If
Next


Where the html may look like:

<input type="checkbox" name="chkBox">
0
 

Author Comment

by:kennedymr
ID: 8164271
Appreciate your help.
I can see the method, and will give it a go. Thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 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