Setting a form select value while using CF bind

I can get the first select to work using the cfif statement...

<option value="#lastState#" <cfif #laststate# eq '#cookie.state#'>selected</cfif>>#titleCase(lastState)#</option><br />

However, I don't know what to use as a variable to check the variable...

 <cfselect name="city" bindOnLoad="Yes" bind="cfc:city.getCity({state})" class="inputForm" <cfif city.getCity eq ''>selected</cfif> />
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

That should work for CF9. AFAIK it's not built into CF8.  For CF8, you need to use a work around like this:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
monosythAuthor Commented:
hmm, couldn't get that example to work with my code... any help using my existing code?
monosythAuthor Commented:
Perfect, had some extra help to figure this out. Thanks!
Related selects are a little more complicated, because you have to wait for the bind to the other field {state}.. to complete first.  Did you see fix mentioned in the comments section (#13)? I think that should work in either scenario.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Development Software

From novice to tech pro — start learning today.