logo

New Response

« Return to the main article

You are replying to:

  1. Jake

    I have checked this out and my one comment would be regarding the exclusion of the reserved word FIELD.

    I use two types of search within one of my sites - one is a wildcard, which uses the searchbox as you described. The other uses SELECT or dropdown boxes for country, company and initial. I use the same doSearch code (because it executes MUCH quicker than an agent using FTSearch) which does something like this:

    if(country =='<-Select Country ->' ) { searchstring=''; } else { searchstring='FIELD Country=' + country; }

    if(company =='<- Select Company ->' ) { searchstring=searchstring + ''; } else { if (searchstring == '') { searchstring='FIELD CompanyName=' + company; } else { searchstring=searchstring + ' AND FIELD CompanyName=' + company; } }

    if(initial =='<- Select First Initial of Lastname ->' ) { searchstring=searchstring + ''; } else { if (searchstring == '') { searchstring='FIELD LastName =' + initial + '*'; } else { searchstring=searchstring + ' AND FIELD LastName =' + initial + '*'; } }

    if (searchstring==''){ alert("You must select at least one item"); return false; }

    window.status='Searching...'; doSearch(searchstring,'1');

    The additional parameter just forces the doSearch to ignore the reserved words check.

    tq

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: