Results 1 to 7 of 7

Thread: [RESOLVED] How to split string(In HTML page)

Hybrid View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Location
    Iran
    Posts
    237

    Resolved [RESOLVED] How to split string(In HTML page)

    Hi,
    How can i split(Get) value from this tag: NewAccountURL

    HTML CODES... <input type="hidden" id="NewAccountURL" value="https://www.google.com/accounts/captcha?ctoken=X_FXnPu9weJb3Akn7Y9_bZmWuKP3MNdslPpg" name="NewAccountURL"> HTML CODES...

    Thanks .
    Y.P.Y

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629

    Re: How to split string(In HTML page)

    Research on using DOM objects in VB, eg. HTMLDocument object.

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How to split string(In HTML page)

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: How to split string(In HTML page)

    Quote Originally Posted by RobDog888
    Is that your fav thread RobDog?

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: How to split string(In HTML page)

    Quote Originally Posted by lintz
    Is that your fav thread RobDog?
    Yes It shows at least two different ways to access a webpages source.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6
    Junior Member
    Join Date
    May 2006
    Posts
    18

    Re: How to split string(In HTML page)

    hi,

    please open new project and apply following code
    add a web browser control in your form (change name: w)
    add references Microsoft HTML Object Library
    and add 4 Command Button.

    Code Here:
    vb Code:
    1. Dim WithEvents doc As HTMLDocument
    2. Private Sub Command1_Click()
    3. MsgBox "Element Value : " & vbNewLine & doc.getElementById("NewAccountURL").Value
    4. End Sub
    5. Private Sub Command2_Click()
    6. MsgBox "Element Name : " & vbNewLine & doc.getElementById("NewAccountURL").Name
    7. End Sub
    8. Private Sub Command3_Click()
    9. MsgBox "Element Line : " & vbNewLine & doc.getElementById("NewAccountURL").outerHTML
    10. End Sub
    11. Private Sub Command4_Click()
    12. MsgBox "Element TagName : " & vbNewLine & doc.getElementById("NewAccountURL").tagName
    13. End Sub
    14. Private Sub Command5_Click()
    15. MsgBox "Element Type : " & vbNewLine & doc.getElementById("NewAccountURL").Type
    16. End Sub
    17. Private Sub Form_Load()
    18. w.Navigate App.Path & "\testPage.html"
    19. End Sub
    20. Private Sub w_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
    21. Set doc = w.Document
    22. End Sub

    demo project include...

    Note: sorry for bad english...
    Attached Files Attached Files

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Location
    Iran
    Posts
    237

    Re: How to split string(In HTML page)

    Very thanks all , also KanKi.
    Y.P.Y

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