Results 1 to 3 of 3

Thread: [RESOLVED] webbrowser combobox

  1. #1

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Resolved [RESOLVED] webbrowser combobox

    how can i scroll through a webbrowser combobox's items + select 1 if it equals a string value?

    i've got the id of the combobox

    thanks for your help

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: webbrowser combobox

    Basically you call WB.GetElementById to get the htlmelement of the dropdownlist you're after, then call GetElementsByTagName("option") to get the htmlelementcollection containing all the items in the dropdownlist. Loop thru this collection calling GetAttribute("value") on each element to look for the one you need and once found, call SetAttribute("selected") =true.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  3. #3

    Thread Starter
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Re: webbrowser combobox

    perfect... well close enough.

    GetAttribute("text")

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