Skip to main content
Known Participant
February 6, 2010
Question

Populate Text Field From List/Menu

  • February 6, 2010
  • 1 reply
  • 457 views

Hi All,

I know this has been posted elsewhere, but I don't seem to be able to get anything to work.

I have a List/Menu populated by a table in a database: There are two fields ID and Name_Combined.

The Menu/List consists of the Names but I need to auto fill the ID into a text field dependant on the name selected.

I am using Dreamwaever CS4 and the asp file is attached.

Many thanks

This topic has been closed for replies.

1 reply

David_Powers
Inspiring
February 7, 2010

I haven't done ASP for a long time, so the code in your page looks like Klingon to me. However, it strikes me that you're approaching this the wrong way. Instead of applying the combined name to the value of each option, use the combined name as what is displayed in the menu, and assign the ID to the value. Then, when the form is submitted, the ID will be submitted automatically by the menu. There is no need for the text field.

Known Participant
February 7, 2010

Many thanks for your reply. You are quite correct. I WAS going about it the wrong way!

Regards