"bonehead" <se**********@here.org> wrote in message
news:3F**************@here.org...
This is really a html question but I'm posting it here because it's
related to a php site I'm developing.
I'd like to have a drop-down box (or 'combo box' as it's called in
visual basic) that allows the user to either select from the list *or*
type in whatever other value they desire. In VB and VBA this is referred
to as a Limit to List property.
Is there an equivalent form object in html?
since it's php it would not be hard to create a little selectAdd function
that creates your <select> and your <input type>
I know it would not be hard 'cause I did it for a site recently. My code,
however, depends on my personal data modeling conventions, so it probably
wouldn't be useful to you. Here are the juicy bits
$query = "select * from $tableName .....
while ($myrow = mysql_fetch_array($ ..... {
echo "<option value=$myrow[0] $selectedVar>";
echo $displayFieldContent; //this is set by an argument to my function,
basically contains another row
echo "</option>\n";
}
echo "</select>";
echo "<br>Or add: ";
echo "<input type=text name=Adding".$entityName.">";
Then my <action> checks for a var named "Adding%" and if it finds one it
does the insert, then puts the mysql_insert_id() into whatever table the
form addresses.