Question
Drop-down menu with both static and dinamic data
Hi to everyone!!!
Please is very important if someone could answer me fast !
This is the code:
...
<cfquery name="getCountry" datasource="db">
SELECT Country
FROM Table
ORDER BY Country
</cfquery>
...
<select name="menu">
<option value="staticOption.cfm">America</option>
<cfoutput query="getCountry">
<option value="dinamicOption.cfm">#Country#</option>
</cfoutput>
</select>
The output will be:
America
(here is a hole)
Australia
Cuba
Ecuador
Italia
...
I don't know why the query produces a list of Countries (or other data) with a hole in top of the list. My problem is that I have to add the first option in the menu, that is not a result of a query but only a static option, cause I want to have the list ordered. And I want that the first selected option to be empty.
So I want to have this:
first selected option empty
America
Australia
Cuba
Ecuador
Italia
...
Please can someone tell me what to do?
thanks a lot
Please is very important if someone could answer me fast !
This is the code:
...
<cfquery name="getCountry" datasource="db">
SELECT Country
FROM Table
ORDER BY Country
</cfquery>
...
<select name="menu">
<option value="staticOption.cfm">America</option>
<cfoutput query="getCountry">
<option value="dinamicOption.cfm">#Country#</option>
</cfoutput>
</select>
The output will be:
America
(here is a hole)
Australia
Cuba
Ecuador
Italia
...
I don't know why the query produces a list of Countries (or other data) with a hole in top of the list. My problem is that I have to add the first option in the menu, that is not a result of a query but only a static option, cause I want to have the list ordered. And I want that the first selected option to be empty.
So I want to have this:
first selected option empty
America
Australia
Cuba
Ecuador
Italia
...
Please can someone tell me what to do?
thanks a lot