how to get src=" " value from webbrowser controle source code ?
hi all. i am loading a web page in webbrowser controle . I want to extract the value of src="" from the source code. I used the following code to get value of href="" successfully but dont know how to get value of src=""!
i hope some one show me how to get that value src="" .
Note: there are few src "" in the source code but i am only
intrested in src="" value that has play.php?mediaid= on it
HTML Code:
<TD width="430" bgcolor="#000000" align="center" valign="top"><IFRAME src="http://www.somesite.com/videoplayer/player.php?mediaID=12345" width="430" height="348" marginwidth="0" marginheight="0" hspace="0" vspace="0" scrolling="no" frameborder="0" ></IFRAME></TD>
</TR>
<TR>
Code:
Private Sub Command5_Click()
Dim doc As HTMLDocument
Dim aHref As HTMLAnchorElement
Set doc = WebBrowser2.Document
For Each aHref In WebBrowser2.Document.All.tags("A")
'MsgBox aHref.href
If InStr(aHref.href, "player.php?mediaID=") Then
List2.AddItem aHref.href
End If
Next aHref
End Sub
Re: how to get src=" " value from webbrowser controle source code ?
DigiRev's example here might give you an idea of how to do what you're after
Re: how to get src=" " value from webbrowser controle source code ?
Max187Boucher's example here might give you an idea of how to do what you're after ;)
haha sorry NightWalker but i answered his question in his other post... which was kind of a duplicated post