Jump to content

Self-changing web search


Hawk

This topic is 8451 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I'm using V4 with Web Companion on a Mac. I want to build a web database that includes a list of postcodes (zip codes) and reps. Each rep has a number of different postcodes associated with them. I want the end user to be able to put in their postcode and find the nearest rep. Due to the nature of the data not all possible postcodes are included in the database, so I want the system to:

(a)Firstly search for an identical match to the user input.

(b)If this fails, search again looking for only the first 4 characters of the postcode.

©If this fails look only for the first 3 characters of postcode.

Any advices would be gratefully received.

Thanks

Link to comment
Share on other sites

If the first search fails the -error format file will be returned. Use a meta refresh on this to perform the new search based on the previous search criteria.

Now the rub is that I don't think the the search criteria is available because there were no records found -- you'll have to tst it yourself.

The other suggestion is to doo all three of the searches at once using [inLineAction], that way results are guaranteed. Better to give too much than too little.

Link to comment
Share on other sites

You put an action tag in the meta refresh... just build up the url to include the -db, -lay, -format, etc information in it.

A url can do anything a form can do, only the url doesn't need the user to "click" it, which means it can be put into a meta refresh.

Link to comment
Share on other sites

if your not comfortable with meta refreshing you could always build a form on the error page that had the search criteria in it (based on the previous search) then just submit the form with and onLoad command..

<body onLoad="document.FORMNAME.submit()">

make sure you change FORMNAME to the name of your form..

[This message has been edited by bman (edited February 06, 2001).]

Link to comment
Share on other sites

This topic is 8451 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.