Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL SYNTAX OR VB CODE TO DISPLAY COMBO BOX VALUES IN TEXTBOXES.

Status
Not open for further replies.

Gemini07306

Technical User
Jun 25, 2003
15
US
PLESEAS HELP ANYONE !!!
My dilemma is that I have a form that contains a combobox(drop-down). The combo box has values with 3 fields:
Name Age race.
I have created three textboxes to store or display each of the value from the combo box into each of the three textboxes. What is the syntax to do this?
Example:
I want "Name" to be displayed in textbox1
"Age" to be displayed in textbox2
and "Race" to be displayed in textbox3.
thanks in advance for your help.
email: tgifgemini@yahoo.com
 
How are you storing three fields within the value of a single option tag?

As far as I know, the only way to do that would be to have a string that makes use of a given character as a delimiter to separate components of the value.
So, the simple answer to your question is that you'd use the same character as a delimiter in a ColdFusion list:

Code:
<select name=&quot;myDropdown&quot; ...>
     :
   <option value=&quot;Name|Age|Race&quot;>
     :
</select>

and on the action page that the form submits to:
Code:
<input type=&quot;text&quot; name=&quot;name&quot; value=&quot;#ListGetAt(FORM.myDropdown,1,&quot;|&quot;)#&quot;>

<input type=&quot;text&quot; name=&quot;age&quot; value=&quot;#ListGetAt(FORM.myDropdown,2,&quot;|&quot;)#&quot;>

<input type=&quot;text&quot; name=&quot;race&quot; value=&quot;#ListGetAt(FORM.myDropdown,3,&quot;|&quot;)#&quot;>




-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top