[ic] "Select a Brand" drop down, nearly there!!!
John Delaney
interchange-users@icdevgroup.org
Thu Jan 23 05:43:00 2003
I'm having trouble in figuring out why my drop-down menu select is not
working.
Briefly, I have a results page in which I have two drop down menus. One for
"Sort By", which works fine. The Other a "Select a Brand" list which shows
the matching brands, with a match count, allowing a user to narrow down the
results to the selected brand. I have managed to get most of it to work
except for the importing part. When you goto to select your brand nothing
happens. The results are the same.
I know the answer is something simple. Usally when I post something to the
list the answer is something silly like a missing quote or something. Please
help!
Heres the relevent code:
<form action="[process]" method=post>
<input type=hidden name=mv_todo value=return>
<input type=hidden name=mv_nextpage value=@@MV_PAGE@@>
<select name=select_brand onChange="this.form.submit()"
style="width: 250px;">
<option value="" [selected name=select_brand]>Select a Brand:
[query sql="SELECT DISTINCT manufacturer, COUNT(*) AS man_count
FROM products
WHERE shop = 'cook shop' AND category = '[scratch
current_category]' GROUP
BY manufacturer" type=list ml=9999]
<option value="[sql-param manufacturer]" [selected
name=select_brand]> [sql-param manufacturer] ([sql-param man_count])
[seti current_man][sql-param manufacturer][/seti]
[/query]
</select>
</form>
[search-region more=1 search="
co=1
op=em
sf=shop
se=cook shop
op=em
sf=category
se=[scratch current_category]
[if value select_brand = [scratch
current_man]]sf=manufacturer/se=[scratch current_man][/if]
ml=21"
]
John D