If a search is submitted and zero docs are returned, follow this procedure to provide your own custom display message:
- Add a field named <TotalHits> (name has to be total hits)
- Add the field to contain the custom message <msg>
- Hide <msg> when totalhits >0
- Default value for <msg>="Your search for" + <searchstring> +" returned no results."
Use the style tags or DHTML and you can have spectacular effects.
Do you have comments on this tip? Let us know.
This tip was submitted to the SearchDomino.com tip exchange by member Prashul Kumar. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.