Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationHacks and Mods (Moderators: scott, DanO, Marty)"Simplifying" Search Feature
Pages: [1]   Go Down
Print
Author Topic: "Simplifying" Search Feature  (Read 490 times)
0 Members and 1 Guest are viewing this topic.
JamesMeng
Guest
« on: January 23, 2002, 08:33:00 PM »

I am building a calendar that has a number of fields - Title, Description, Date, Location...

Having so many fields makes the search page rather cumbersome.  I am looking to make the search page a simple, one textbox keyword search (ala Google) that searches all fields for the keyword entered.

I modified the part of DBFileUtil.inc that generates the html form elements to write out as INPUT TYPE="hidden" instead of INPUT TYPE="text".

I then modified the template to have one "dummy" form element  that looks like this:
<INPUT TYPE="text" NAME="search_field" SIZE="30" onChange="this.form.FIELD_title.value=this.value; this.form.FIELD_description.value=this.value;">

This populates the values of all of the hidden form elements with the keyword entered into the search box.  This successfully allows me to search each field by the keyword entered.

This is also where the problem begins - Lets say I do a search for foo.  It looks for events where foo exists in the title AND the description AND the date AND the location...  That's a problem!

The missing piece of my puzzle is how do I make the query OR instead of AND.  Is this doable?  Where do I need to be lookin?  Any help would be greatly appreciated...

Logged
Scott
Guest
« Reply #1 on: January 23, 2002, 08:53:00 PM »

I just responded to the other thread on this topic   http://www.calendarscript.com/support/forum/Forum6/HTML/000035.html

------------------
Scott
CalendarScript.com


Logged
yullah
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: June 01, 2003, 04:25:00 PM »

any updates here?

the link referred to above doesn't give a conclusive solution...

thanks!

------------------

Logged
DanO
Moderator
Full Member
*****

Karma: 13
Offline Offline

Posts: 230

Please don't PM me. Post in the open forum.


WWW
« Reply #3 on: June 01, 2003, 04:49:00 PM »

** the link referred to above doesn't give a conclusive solution... **

Maybe you could try the suggestions to see which works? There is only 2 of them.

When you find out, maybe you can post your results to that other message and put a conclusive solution to it?

JMO

Dan O.

------------------

Logged
Pages: [1]   Go Up
Print
Jump to: