...

View Full Version : Please help me out!!!



xolela
02-10-2004, 07:06 AM
(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!!

glenngv
02-10-2004, 07:29 AM
Point #2 - http://www.codingforums.com/postguide.htm

Philip M
02-10-2004, 07:47 AM
Thank you in Advance!!


YUCK! PUKE!

Manners maketh the man.

RadarBob
02-10-2004, 04:40 PM
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:


<select>
<option value='254'>Pick Me! Pick Me!</option>
<option value='3'>No, me! me! ohhh! ohhh!</option>
</select>

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!"



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum