You could just use CSS - display:none - for example, or you could handle
the query and logic with the same script that populates the database or
even create a Javascript function on the page to populate a hidden field
with the correct value depending on the selected option.
At 21:36 04/12/02 +0000, you wrote:
>My objective is to display in an option box the concatenation from the
>database of the field 'printerid' and (in parenthesis) the
>field 'location'. However I want to only store the printerid based on user
>selection. Rather than worrying about parsing out the printerid, I thought
>I could have a second option box, which would be hidden, which contains
>just the printerid selections in the same order as the first option box.
>When they selected an item from the first option box, I would use the
>associated selection index to pull out the printerid from the second box
>and populate the database with it.
>Here is a snippet of code:
><tr>
><td><INPUT TYPE="hidden" NAME="InTonPrinter" ></td>
><td colspan=2><INPUT TYPE="radio" NAME="InCategory" VALUE="replace toner"
> > Replace toner >></td>
><td colspan=2>Printer: <SELECT NAME=pidwithlocation SIZE="1"><OPTION
>SELECTED>Choose One<? echo "$option_block_with_location"; ?></SELECT></td>
><td colspan=1><SELECT NAME=pid SIZE="1"><OPTION SELECTED>Choose One<?
>echo "$option_block"; ?></SELECT></td>
></tr>
>
>1) Can you tell me how to 'hide' the 2nd option box (name=pid) from view.
>2) Any better ideas to accomplish this would be appreciated.
>
>Appreciate the help!