|
-
Jul 26th, 2002, 06:07 PM
#1
Thread Starter
Hyperactive Member
Using VB to fill out web form?
I have a form on a website with 4 text boxes and a submit button.
Is there any way I can use VB to pass information to those textboxes and trigger the submit button without actually opening the web-browser?
Would I need an ASP form instead of a plain HTML form?
And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.
-
Jul 28th, 2002, 12:24 PM
#2
Hyperactive Member
Add the control named "Microsoft Internet Controls"
add a webbrowser to the form. If you name it something besides
"wb", do a find and replace for the name. If there are many forms
on the page, then find out which one you want it's (X-1) because
it's a zero based array.
Here's the code:
Code:
Private Sub cmdGo_Click()
wb.Navigate "www.theSiteYouWantToGoTo.com"
JusWait
wb.Document.Forms(0).FirstTextBoxName.Value = "1st Value"
wb.Document.Forms(0).SecondTextBoxName.Value = "1st Value"
'etc...
'then
wb.Document.Forms(0).submit()
End Sub
Private Sub JusWait()
Do
DoEvents: DoEvents: DoEvents
'Add this if you want..but you need to define the variable
'If bolUnloading Then Exit Sub 'User clicked close
Loop Until wb.ReadyState = READYSTATE_COMPLETE
End Sub
-
Jul 29th, 2002, 07:19 AM
#3
Thread Starter
Hyperactive Member
Thanks! Whats the value for READYSTATE_COMPLETE?
And I, for one, welcome our new insect overlords. I'd like to remind them as a trusted TV personality, I can be helpful in rounding up others to toil in their underground sugar caves.
-
Jul 29th, 2002, 10:19 AM
#4
Hyperactive Member
4, but it's a predefined constant. Just typewb.ReadyState and then "=" followed by a space, and you will get the 4 choices.
-
May 21st, 2015, 01:06 PM
#5
Member
Re: Using VB to fill out web form?
hi, anyone could help me with this? i get an 'JSON undefined' error when trying to navigate to the site. thx!
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
|
Click Here to Expand Forum to Full Width
|