Hey Folks, I'm looking to change the iframe src of an iframe in my webbrowser control using an onclick (the javascript triggers window.external.iflink()
and in VB2008 I have:
However the above code doesn't seem to work, how can i target iframe id (cf1) and change its source using an onclick within the webbrowser control?Code:Public Sub iflink() Dim CurrentWindow As HtmlWindow = WebBrowser1.Document.Window For Each Frame As HtmlWindow In CurrentWindow.Frames 'Get all frames If Frame.Name = "cf1" Then Frame.Navigate("csc.php") End If Next End Sub
Many thanks,
n3m.




Reply With Quote