something like:

<select name="city">
     <option value="#cityID#"<cfif form.city is cityID>
selected="selected"</cfif>>#city#</option>
</select>

you'll probably have to throw a <cfparam name="form.city" default=""
/> out there for the initial form display.

getting the 2nd <select> to display the appropriate cities will be a
bit more work, and the answer will depend on how you're currently
doing it.  If it's javascript, you'll need to invoke the javascript
function manually.  something like:

<cfif structKeyExists(form, 'city')>
     <cfoutput><script
type="text/javascript">populateAreas('#form.city#');</script></cfoutput>
</cfif>

But the short answer is... yes.  there is a way to do this :)

On Mon, Jul 7, 2008 at 11:24 AM, Rick Faircloth
<[EMAIL PROTECTED]> wrote:
> Hi, all...
>
> I'm using a dynamically populated select (multiple)
> allowing users to select one or more cities for which
> they'd like to view properties.
>
> When the form which contains the form is submitted, it
> submits back to the same page it's on.
>
> What I'd like to have happen in the select is for the
> first selection to appear at the top of the select choices.
>
> e.g.
>
> First Population of Select:
>
> - any city
> - Athens
> - Atlanta
> - Albany
> - Augusta
> - etc.
>
> User chooses "Albany".
>
> Select reappears:
>
> - Albany
> - Augusta
> - etc.
>
> Any way to control this with CF or otherwise?
>
> Thanks,
>
> Rick
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308676
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to