Skip to main content
Participant
July 14, 2008
Answered

Refresh bind after some condition is met

  • July 14, 2008
  • 1 reply
  • 262 views
Hi people,

I have a cfselect that's bound to an input. Typing some characters in the input triggers the select to update it's content (which it gets as a JSON string).

Works fine. But I want more! I want the event to occur only after 3 or more characters are entered in the input. I could use {filter@none} in the bind, but then I must somehow refresh the bind programmatically.

I did some quite exhaustive googling, without any satisfying result. Maybe it's just too dumb a question or a very outlandish wish...

Any ideas?

<input type="text" name="filter" id="filter">

<cfselect name="seladdress" id="seladdress"
bind="url:index.cfm?event=adresses.list&surname={filter@keyup}"
display="SURNAME"
value="ID"
bindOnLoad="false"
>
This topic has been closed for replies.
Correct answer acdhirr
Yes, this is me replying myself.

You could do that by means of this:
http://cfsilence.com/blog/client/index.cfm/2007/10/22/Refreshing-A-Bound-CFSelect

Then you be using cfajaxproxy, which connects directly to your CFC's. Since I want all requests, even AJAX, to go through my framework (Model Glue) I'm not going to use it that way.

See another solution at:
http://www.trilobiet.nl/blog/index.cfm/Coldfusioncustomtags

1 reply

acdhirrAuthorCorrect answer
Participant
July 18, 2008
Yes, this is me replying myself.

You could do that by means of this:
http://cfsilence.com/blog/client/index.cfm/2007/10/22/Refreshing-A-Bound-CFSelect

Then you be using cfajaxproxy, which connects directly to your CFC's. Since I want all requests, even AJAX, to go through my framework (Model Glue) I'm not going to use it that way.

See another solution at:
http://www.trilobiet.nl/blog/index.cfm/Coldfusioncustomtags