Adding a drop down menu to the search

dkART

Joined: 2004-05-22
Posts: 51
Posted: Sat, 2005-12-17 16:52

Can anyone tell me how I go about adding a dropdown menu that still allows you to type in your own search word or choose from the menu?

<form id="search_SearchBlock" action="{g->url}" method="post" onsubmit="return checkForm()">
<div>
{g->hiddenFormVars}
<input type="hidden" name="{g->formVar var="view"}" value="search.SearchScan"/>
<input type="hidden" name="{g->formVar var="form[formName]"}" value="search_SearchBlock"/>
<input type="text" id="searchCriteria" size="18"
name="{g->formVar var="form[searchCriteria]"}"
value="{g->text text="Search the Gallery"}"

do I do something like this? I found something for G1 but not G2

option value="{g->text text="artist name 1"}"
option value="{g->text text="artist name 2"}"
option value="{g->text text="artist name 3"}"

onfocus="search_SearchBlock_focus()"
onblur="search_SearchBlock_blur()"
class="textbox"/>
<input type="hidden" name="{g->formVar var="form[useDefaultSettings]"}" value="1" />
</div>
{if $showAdvancedLink}
<div>
<a href="{g->url arg1="view=search.SearchScan" arg2="form[useDefaultSettings]=1"
arg3="return=1"}"
class="{g->linkId view="search.SearchScan"} advanced">{g->text text="Advanced Search"}</a>
</div>
{/if}
</form>

thanks,

PS: when I use the search feature on this site, it will only let me view the first page of results? When I click on any other page, next page, etc, it kicks me back to the main search page where you enter what you are searching for.

Dan
[URL]www.danielkimeart.com[/URL]

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2005-12-19 00:20

I've never seen a menu like this on a website? Have you? Can you provide an example? I've only seen either a drop down menu with options or a text box.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here