|
-
Sep 30th, 2005, 12:19 PM
#1
Thread Starter
Addicted Member
[RESOLVED]Webbrowser password save
Hi im building a webbrowser and have come to a bit of a problem. In firefox and ie6 and probly ALOt more webbrowsers you have the option of saving a password/user form. Im just wondering how can i check if theres anything in any textforms and give the users the option of saving their user/password.
Thx a bunch
messup000
Last edited by messup000; Sep 30th, 2005 at 08:54 PM.
-
Sep 30th, 2005, 12:41 PM
#2
Re: Webbrowser password save
VB Code:
Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
On Error Resume Next 'Needed so if there is no "password" field it will skip
If (pDisp Is WebBrowser1.Application) Then
If WebBrowser1.Document.All.password.Value <> "" Then 'Field Name could be "password"
MsgBox WebBrowser1.Document.All.password.Value
End If
If WebBrowser1.Document.All.pass.Value <> "" Then 'Could be pass (Could be others!)
MsgBox WebBrowser1.Document.All.pass.Value 'You need to look at the source of the page to see what the 'name' of it is
End If
End If
End Sub
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Sep 30th, 2005, 02:31 PM
#3
Thread Starter
Addicted Member
Re: Webbrowser password save
Yea i understand how to get it like that but what im really looking for is a way to get the name of a textfield that has a value
thx for the try tho
messup000
-
Sep 30th, 2005, 02:53 PM
#4
Re: Webbrowser password save
ahh.. gim me a few
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Sep 30th, 2005, 03:15 PM
#5
Re: Webbrowser password save
VB Code:
If (pDisp Is WebBrowser1.Application) Then
Dim HTML As HTMLDocument
Dim HT As HTMLInputTextElement
Set HTML = WebBrowser1.Document
For Each HT In HTML.All
If HT.isTextEdit And HT.tagName = "INPUT" Then
If HT.Type = "password" Then
Debug.Print HT.Name
End If
End If
Next
End If
HT.Name will be what you are after 
or in place of Debug.print Grab HT.Value
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Sep 30th, 2005, 08:52 PM
#6
Thread Starter
Addicted Member
Re: Webbrowser password save
wow thats cool! This is going to help alot! And for the username all i have to do is check if any text imput boxes have text in them and save the name of the textbox!
thx a bunch
Messup000
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
|