<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1264" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=125443418-09102003><FONT face=Arial color=#0000ff
size=2><select id='City'></FONT></SPAN></DIV>
<DIV><SPAN class=125443418-09102003><FONT face=Arial color=#0000ff size=2>
<option value='17'>New York</option></FONT></SPAN></DIV>
<DIV><SPAN class=125443418-09102003><FONT face=Arial color=#0000ff size=2>
<option value='13'>Los Angeles</option></FONT></SPAN></DIV>
<DIV><SPAN class=125443418-09102003><FONT face=Arial color=#0000ff size=2>
<option value='6'>Boston</option></FONT></SPAN></DIV>
<DIV><SPAN class=125443418-09102003><FONT face=Arial color=#0000ff
size=2></select></FONT></SPAN></DIV>
<DIV><SPAN class=125443418-09102003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=125443418-09102003><FONT face=Arial color=#0000ff size=2>when
the CITY gets back to the server it will have the ID value - since this is basic
HTML, there's no browser version/scripting issues either.</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
javascript-bounces@LaTech.edu [mailto:javascript-bounces@LaTech.edu] <B>On
Behalf Of </B>David S Levy<BR><B>Sent:</B> Thursday, October 09, 2003 1:11
PM<BR><B>To:</B> [JavaScript List]<BR><B>Subject:</B> [Javascript] select list
option sending<BR><BR></FONT></DIV>
<DIV><FONT size=2>Hey. I'm trying to make a dropdown(select) list of
locations in a form, but instead of sending off the location name on
submittal, I'd like to send an associated location ID, since I'm working with
a database. I was wondering if I can set up a form element with a name
and without a type on selection of a given dropdown option. To
elaborate:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Let's say I have a dropdown list of the following
cities:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>New York</FONT></DIV>
<DIV><FONT size=2>Los Angeles</FONT></DIV>
<DIV><FONT size=2>Boston</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>And each of these cities has associated with it a location
ID, like:</FONT></DIV>
<DIV><FONT size=2>New York - 17</FONT></DIV>
<DIV><FONT size=2>Los Angeles - 13</FONT></DIV>
<DIV><FONT size=2>Boston - 6</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>I'd like a way to list the cities but send the ID's.
Could I do something within the <option> tag like
onselect="this.form.city_ID=17" for New York? If yes, could
I just do it like that or would I need to declare the form
element city_ID as a hidden variable or something along those lines? If
not, does anyone have any ideas? I hope my javascript idea is
understandable, I'm just turning to this language in order to move along a
project that's primarily in PHP.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>David.</FONT></DIV>
<HR>
<PRE>The information contained in this communication may be confidential, is
intended only for the use of the recipient(s) named above, and may be
legally privileged. You are hereby notified that any dissemination,
distribution or copying of this communication and any of its contents or
attachments is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to this
message and please delete this message from all computers and servers.</PRE></BLOCKQUOTE></BODY></HTML>