Drop down
I have multiple drop down list populated from a database.
I want the first value in each table to be the default selection.
In the past this has work as expected but this time the default selection varies from each table.
Thanks
Wyn
I have multiple drop down list populated from a database.
I want the first value in each table to be the default selection.
In the past this has work as expected but this time the default selection varies from each table.
Thanks
Wyn
The browser should automatically select the first value if no default selection is specified. Do you have a sample page I could look at and look at the associated php code? Normally the behavior you want should be automatic, so something on the page must be causing the abnormality.
Sure,
I went into some of the recordsets and sorted by id in descending order to get what I wanted but the selection list opens from the bottom.
Here is the file.
Thanks,Wyn
It looks like you have a dynamic selection set for each that would try to make every option selected. If you just remove that then the first one will be selected instead of the last.
So for instance in the first list this code:
<option value="<?php echo $row_Make_Recordset['make']?>"<?php if (!(strcmp($row_Make_Recordset['make'], $row_Make_Recordset['make']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Make_Recordset['make']?></option>
should be:
<option value="<?php echo $row_Make_Recordset['make']?>"><?php echo $row_Make_Recordset['make']?></option>
I've been out for the last week so I didn't see you reply. Thanks. Don't know why that code was there. I just used the instructions from your dropdown tutorial.
I'm also having trouble with Security Assist. I'm going to revisit it and see what I can do. It seems as though that the tutorial my be a little out dated and I'm not seeing the same options available as the tutorial.
Thanks, again,
Wyn
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.