|
-
Jun 8th, 2007, 01:42 AM
#1
Thread Starter
New Member
question about WebBrowser control?
I've VB6 code like that :
vb Code:
WebBrowser1.Document.All("username").Value = "my_username"
WebBrowser1.Document.All("passwd").Value = "my_password"
WebBrowser1.Document.Forms(0).Submit
WebBrowser1.Navigate "http://360.yahoo.com"
So in this code , it'll navigate http://360.yahoo.com before the form is submit to login . So how can I make it navigate another page after the form is already submited and all the page is loaded ?
-
Jun 8th, 2007, 03:48 AM
#2
Hyperactive Member
Re: question about WebBrowser control?
 Originally Posted by ghostshadow189
I've VB6 code like that :
vb Code:
WebBrowser1.Document.All("username").Value = "my_username"
WebBrowser1.Document.All("passwd").Value = "my_password"
WebBrowser1.Document.Forms(0).Submit
WebBrowser1.Navigate "http://360.yahoo.com"
So in this code , it'll navigate http://360.yahoo.com before the form is submit to login . So how can I make it navigate another page after the form is already submited and all the page is loaded ?
In the WebBrowser1 DocumentComplete add:
Code:
If Redirected = False Then
WebBrowser1.Navigate "http://gotosomewheresite.com"
End If
Hope that helps.
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
-
Jun 8th, 2007, 08:46 AM
#3
Thread Starter
New Member
Re: question about WebBrowser control?
thanx , but what's Redirected variable ?
-
Jun 8th, 2007, 09:20 AM
#4
Re: question about WebBrowser control?
 Originally Posted by ghostshadow189
thanx , but what's Redirected variable ?
Where is that coming from?
-
Jun 8th, 2007, 09:24 AM
#5
Thread Starter
New Member
Re: question about WebBrowser control?
can u explain more clearly? i c that there no Redirected property of WebBrowser ?
-
Jun 11th, 2007, 09:28 PM
#6
Hyperactive Member
Re: question about WebBrowser control?
 Originally Posted by ghostshadow189
can u explain more clearly? i c that there no Redirected property of WebBrowser ?
Redirect is the variable that will stop the browser from doing an infinite navigation.
In other words:
Put the code below in your Form_Load:
Code:
Dim Redirected as Boolean
Redirected = False
Then in your WebBrowser1_DocumentComplete event put the code below:
Code:
If Redirected = False Then
WebBrowser1.Navigate "http://gotosomewheresite.com"
Redirected = True
End If
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
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
|