Here is my code. I would like to put the shipping address, shipping city, shipping state and zip code in their own boxes based on the dropdown. Im thinking I need a function since its more than one texbox? And use the selected index somehow? I dont know how to query the related fields in the dropdown.
<%SQL = "SELECT CUSTOMER_ID,CUSTOMER_SHIPPING_ADDRESS,CUSTOMER_SHI PPING_CITY,CUSTOMER_SHIPPING_STATE,CUSTOMER_SHIPPI NG_ZIP_CODE FROM TBL_CUSTOMER WHERE CUSTOMER_TYPE_ID = 'Master Distributor'"
rs.open SQL, Conn%>
<select name="cid" onChange="document.form.companyname.value=this.val ue">
<option SELECTED><%Response.Write(Request.Cookies("cid"))% >
<%Do While Not rs.EOF%>
<option value="<%=rs("CUSTOMER_ID")%>"><%=rs("CUSTOMER_ID" )%></option>
<%rs.movenext%><%loop%><%rs.close%>
</select>
</td>
<td>
<input name="companyname" value="" size="40" maxlength="40">
<input name="saddress" value="" size="40" maxlength="40">
<input name="scity" value="" size="40" maxlength="40">
<input name="sstate" value="" size="40" maxlength="40">
<input name="szipcode" value="" size="40" maxlength="40">