Results 1 to 10 of 10

Thread: Click into a iframe

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    26

    Click into a iframe

    Hi. how do i make vb.net webbrowser control click into a iframe.

    i want it to click the banner on: http://1matrixclub.com/

  2. #2
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Click into a iframe

    Hi, I just looked at the html doc for the page an found the iframe ref
    Code:
    <iframe width="728" height="90" allowtransparency="false" frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0" scrolling="no" src="http://www.promoteburner.com/code.php?id=2448&l=2" name="lolz"></iframe>
    you could access this easy by using a webBrowser control
    1/ navigate to the website (http://1matrixvlub.com)
    2/ on Document Completed event get the pages html and parse it to find the src info within the iframe
    3/ supply this src url into the webbrowser navigate event
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    26

    Re: Click into a iframe

    Quote Originally Posted by Megalith View Post
    Hi, I just looked at the html doc for the page an found the iframe ref
    Code:
    <iframe width="728" height="90" allowtransparency="false" frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0" scrolling="no" src="http://www.promoteburner.com/code.php?id=2448&l=2" name="lolz"></iframe>
    you could access this easy by using a webBrowser control
    1/ navigate to the website (http://1matrixvlub.com)
    2/ on Document Completed event get the pages html and parse it to find the src info within the iframe
    3/ supply this src url into the webbrowser navigate event
    i am a little no0bish. sry. can uplease post code or something

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    26

    Re: Click into a iframe

    buuuuuuuuuuuuuuuuuuuuuuump

  5. #5
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Click into a iframe

    ok put a webbrowser on a form and try this
    Code:
    Public Class Form1
    
        Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
            ' this takes the first link on the page and navigatres to this page
            ' we put the if so that it doesn't do it once it reaches any page other than matrixclub.com
            If WebBrowser1.Url.AbsoluteUri = "http://matrixclub.com/" Then
                Dim link As String = WebBrowser1.Document.Links.Item(1).InnerText
                WebBrowser1.Navigate(link)
            End If
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            WebBrowser1.Navigate("http://matrixclub.com/")
        End Sub
    End Class
    p.s. that site has now vanished lol
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    26

    Re: Click into a iframe

    Quote Originally Posted by Megalith View Post
    ok put a webbrowser on a form and try this
    Code:
    Public Class Form1
    
        Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
            ' this takes the first link on the page and navigatres to this page
            ' we put the if so that it doesn't do it once it reaches any page other than matrixclub.com
            If WebBrowser1.Url.AbsoluteUri = "http://matrixclub.com/" Then
                Dim link As String = WebBrowser1.Document.Links.Item(1).InnerText
                WebBrowser1.Navigate(link)
            End If
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            WebBrowser1.Navigate("http://matrixclub.com/")
        End Sub
    End Class
    p.s. that site has now vanished lol
    Where do i put that code?

  7. #7
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Click into a iframe

    replace the entire code for the form with it
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    26

    Re: Click into a iframe

    Quote Originally Posted by Megalith View Post
    replace the entire code for the form with it
    the code doesn't work. This just copy "Ad by PromoteBurner.com" and then navigate it

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Mar 2009
    Posts
    26

    Re: Click into a iframe

    -BUUUUUUUUUUMP-

    Still looking please

  10. #10
    Fanatic Member Megalith's Avatar
    Join Date
    Oct 2006
    Location
    Secret location in the UK
    Posts
    879

    Re: Click into a iframe

    Quote Originally Posted by napzter13 View Post
    the code doesn't work. This just copy "Ad by PromoteBurner.com" and then navigate it
    the site went down while i wrote that code, you need to change the link index a bit possibly, however the site doesn't exist now. (domain has expired).
    If debugging is the process of removing bugs, then programming must be the process of putting them in.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width