Results 1 to 7 of 7

Thread: Getting HTML values into listbox

Threaded View

  1. #1

    Thread Starter
    Frenzied Member joefox's Avatar
    Join Date
    Oct 2004
    Posts
    1,318

    Getting HTML values into listbox

    So i have some HTML like this

    <li>
    <div id="1"></div>
    <div id="2"></div>
    <div id="3"></div>
    </li>
    <li>
    <div id="1"></div>
    <div id="2"></div>
    <div id="3"></div>
    </li>
    <li>
    <div id="1"></div>
    <div id="2"></div>
    <div id="3"></div>
    </li>

    Right now i am doing a foreach loop on elements with the <div> tag, then checking if the id="1" if it does add the value to a listbox.

    My problem is, i want to also get div id="2" value at the same time and add it to my listbox, since the Persons ID is in div 1 and the Name of the person is in Div2.

    Any ideas on how to do this?

    I was thinking i could do another for each loop, and just add the username behind the id i pull.
    Question is, how do i add to a value or position in a listbox, after its been filled?
    Last edited by joefox; Apr 28th, 2011 at 06:55 PM.

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