drop down list as search field using results area asp pages in Frontpage

A

Andrew Murray

Please refer to my page below, using the database results wizard in Frontpage
2002.

http://www.southern.perth.anglican.org/clergysearch.asp

Is there any way to use a drop-down list as the search field, like on the above
example, rather than the ordinary text field. I sort of have it working with
both at the moment (please try it to see what I mean it is difficult to explain).

Choose an item from the drop down box. You will notice that it then places the
value in the text field as well (in my code this is what the text box has,
generated by the results database area wizard in FP):

I kind of like this idea as a "You Searched for"....kind of thing, but both
fields can be used to input a query request.

<input TYPE="TEXT" NAME="Parish"
VALUE="<%=Server.HtmlEncode(Request("Parish"))%>" size="47">

Basically I want users to have two choices of search methods - type in the value
or select the value from the drop down box., within the same page.

I'm new to asp and databases (although have used flattext files and cgi/perl in
the past only at a novice user level)so I don't quite know what the VALUE
parameter above is saying; however I put in the drop down box and gave it the
field value "Parish" like the text field above, and listed manually all the
values (is there a way to pull these out of the database first, to be able to
arrange a search, or do I effectively need a second results page using the drop
down box option in the Results Wizard, then point the form to my other search
page's asp script (i.e. clergysearch.asp).

It works as is but is still kind of messy.


On another matter, I also have a hard time getting the queries to part-match a
search-string - it wants the full thing or nothing will find a match. If I put
"Cockbu" for "Cockburn" it won't find it. There is no option like commonly seen
for 'any word', 'all words', 'whole word', or 'part/whole' phrase in this
wizard.

I'm using queries such as "SELECT from clergy where Parish LIKE [Parish]" and so
on, rather than EQUALS Parish, and use the OR clause.

One other thing - if I have to go back and re-do the results area wizard it will
re-generate its default layout, and stuff up my nicely formatted page - is there
a way to prevent this? Say I want to go back and add another search field, or
sort the data by another field etc, it will dump my code for its own and I have
to redo my nice design.

Any advice on any of the above, please?.

Thankyou.






--
Andrew Murray
Remove NOSPAM or SPAM BUSTER to reply
to reply

Outgoing message has been scanned with Norton Antivirus..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top