Web Analytics Made Easy -
StatCounter Please help me out!!! - CodingForum


No announcement yet.

Please help me out!!!

  • Filter
  • Time
  • Show
Clear All
new posts

  • Please help me out!!!

    (I'm using javascript) just wanna know if is it possible when you are reading data from database to your Dropdown list, to read in both your item description and its key field. Because when I select an item from my dropdown list, I wanna retrieve all other items that are related to the selected item using that key field. Now I don't know how to attach a key field to the drop down list.

    I know how to do this in VB using a DATA COMBO!!

    Please somebody help.

    Thank you in Advance!!
    Last edited by xolela; Feb 10, 2004, 02:41 AM.

  • #2
    Point #2 - http://www.codingforum.net/postguide.htm
    vBulletin Mods That Rock!


    • #3
      Thank you in Advance!!

      YUCK! PUKE!

      Manners maketh the man.

      All the code given in this post has been tested and is intended to address the question asked.
      Unless stated otherwise it is not just a demonstration.


      • #4
        Ignoring the posting fau pax for the moment...

        The easist way is to carry the key in the 'value' attribute of the individual <option> tags. Thus it might look like this:
           <option value='254'>Pick Me! Pick Me!</option>
           <option value='3'>No, me! me! ohhh! ohhh!</option>
        Your users see "Pick Me! Pick Me!" but what's really being selected is the unseen corresponding value. When one SUBMITs the <form> it's the value of 'value' that's picked up... so "254" is sent, not "Pick Me! Pick Me!"