[ic] on-match not working

Thomas J.M. Burton tom at globalfocusdm.com
Mon Aug 11 18:13:13 EDT 2003


Hi all,

I'm running Interchange 4.8.6 and the [on-match] tags aren't working properly.
If matches for a query or loop search are not found, the code marked for both
[on-match] and [no-match] are displayed.

I've searched the archives for mention of this problem, but have not found any
reference to this particular problem.

An example is the state select box in the foundation demo's checkout.html
page. The code I have is as follows:

[loop search="
  fi=state.txt
  sf=country
  se=[default country US]
  rf=state,name,country
  tf=sorder,name
  ml=100
  "
  option=state]
  [on-match]<SELECT onChange="check_tax(this.form)" NAME=state>[/on-match]
  [list]
  [loop-change 1][condition][loop-param country][/condition]
  <OPTGROUP LABEL="[data table=country col=name key='[loop-param country]']">
  [/loop-change 1]
  <OPTION VALUE="[loop-code]">[loop-pos 1]
  [/list]
  [on-match]</SELECT>[/on-match]
  [no-match]<INPUT NAME=state VALUE="[value state]" SIZE=20>[/no-match]
[/loop]


If a country is selected for which state/province records exist, such as the
US or Canada, the select box appears as it should without a problem. However,
if "Other" is selected as the country, thus returning no results, both an
empty select box (the on-match contents) and the hidden field (from no-match)
end up in the page.

I've also had this happen in other searches through both the [query] and
[loop] tags.

If this issue has been addressed, could someone please point me to the proper
update?

Thanks,
Tom

___________________________________
Thomas J.M. Burton, Design/Production
Global Focus Digital Media, LLC
www.globalfocusdm.com




More information about the interchange-users mailing list