-
Trigger web page bu VB6 WebBrowser Control
opened web page by VB6 WebBrowser contol, this page cantain textbox call textbox1 but there no submit button, so when inout the number in the textbox end press enter page retrive informatin from the database. I have the following code which place input data (number or text) in textbox and triger the bubmit button to retrive information automatically, but sine the page have no submit button and only press enter in the textbox to retrive information, please some one look the code and advise how can trigger the input textbox.
code: THIS CODE WORKED FINE IF PAGE HAVE SUBMIT BUTTON.
Private Sub Command1_Click()
Dim htmlSearchButton As HTMLButtonElement
Set docCurrentHTML = WebBrowser1.Document.documentElement.All
' This field the value in web page textbox1
For Each Item In docCurrentHTML
If Item.tagName = "INPUT" Then
If Item.Name = "textbox1" Then
Item.Value = "1148"
Exit For
End If
End If
Next Item
' The data is in. Now find the button and click it,
' HERE IS I HAVE PROBLEM, SINCE THERE IS NO SUBMIT BUTTON THE COSE SHOULS CLICK TEXTBOX1
For Each Item In docCurrentHTML
If Item.tagName = "INPUT" Then
If Item.Name = "textbox1" Then
Set htmlSearchButton = Item
htmlSearchButton.Click
Exit For
End If
End If
Next Item
Thanks
Similar Threads
-
By (MC3)RaVeN in forum Java
Replies: 0
Last Post: 03-02-2007, 09:30 AM
-
Replies: 0
Last Post: 03-26-2003, 02:17 PM
-
By Franco22 in forum Architecture and Design
Replies: 1
Last Post: 10-17-2002, 11:12 PM
-
By Robin in forum VB Classic
Replies: 1
Last Post: 02-05-2002, 12:53 AM
-
By Mike Hamilton in forum VB Classic
Replies: 4
Last Post: 12-21-2000, 04:41 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks