Gossamer Forum
Home : General : Internet Technologies :

List box populates text box

Quote Reply
List box populates text box

Im working in cold fusion. I need to populate a text box depending on the value selected from a list box.

List Box:
Document Type:
select name="BoardType">
<option value=1 selected>Meeting</option>
<option value=2>Recogs</option>
<option value=3>Reps</option>
<option value=4>Finanl</option>
<option value=5>General</option>

Text BOx:
Name:cfif GetMeeting.MeetingName EQ "">

<cfif GetMeeting.BoardType EQ 1>
<cfset tmp = "Regular Business Meeting">

<cfif GetMeeting.BoardType EQ 2>
<cfset tmp = "Recogs">

<cfif GetMeeting.BoardType EQ 3>
<cfset tmp = "Reps">

<cfif GetMeeting.BoardType EQ 4>
<cfset tmp = "Finanl">
<cfset tmp = "General">

<cfset tmp = GetMeeting.MeetingName>
<input type="text" name="MeetingName" size="39" value="#tmp#"
style="font-family:Verdana, Geneva, Arial, Helvetica, sans-serif; font-size:11px; background-color:white; border-color:black; border-width:1;" maxlength="255">

<i class="alert">Required</i>
The problem is I have the value - General by default in my 'Name' text box

Can someone help!?