SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jan 2008
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How do I retrieve optgroup labels in a listbox?

    I am looping through all the values in a list box and storing them. I have some list boxes that use optgroup labels to show headers. When I use GetROProperty("all items") it gives me a list of all items in the list box but omits the optgroup labels.

    I am wondering if anyone knows a way to get these values. I have thought of one way to get them. By retrieving the innerhtml of the list box and searching the string for every occurrence of the word optgroup. I would rather not do this if there is a better way.

    Any help will be greatly appreciated.
    Thank you

  2. #2
    Junior Member
    Join Date
    Jan 2008
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How do I retrieve optgroup labels in a listbox

    My solution to retrieve the innerhtml of the list box will not work because it will list the optgroup labels one after another. The optgroup labels act as headers in the list box and I need to know where they are situated and what list values fall underneath.

    If anyone at all has any suggestions on how to retrieve the optgroup labels I would be thankful.

  3. #3
    Junior Member
    Join Date
    Jan 2008
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How do I retrieve optgroup labels in a listbox

    Just in case someone has this same problem I want to let you know that I figured it out.

    Here is some sample code:

    Set objTest = objContainer.Object.all.Tags("optgroup")

    For Each strGroup In objTest

    strPleaseWork = strGroup.label

    Next

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 12.50%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 05:40 AM.

Copyright BetaSoft Inc.