Gossamer Forum
Home : Products : DBMan : Customization :

getting Dbman to search onblur?

Quote Reply
getting Dbman to search onblur?
Hi Guys, I've looked....found some stuff that was close, but no cigar as of yet.

What I would like:

A page where people can input part numbers and dbman then searchs and returns the part name. I'd like to do this on a page with perhaps 20 input fields for the part numbers. I'd like the search and return of the part name to be done as a javascript onblur.....they enter the part number, then tab to the next part number field and the name of the part comes up for the part number they just entered.

This is more or less like an ordinary search, except it's 20 searches on one page.....with each being done right after the part field is filled.

Many thanks as usual.

steven99
Quote Reply
Re: [steven99] getting Dbman to search onblur? In reply to
How does the "parts" part of the db get updated? How often does it change?
How many "parts" are there?

It's possible depending how complicated the parts db is.

I've done something similar using two different methods. One involved using separate "client profile" files another uses a listing.
Quote Reply
Re: [Watts] getting Dbman to search onblur? In reply to
In Reply To:
How does the "parts" part of the db get updated? How often does it change?
How many "parts" are there?


the "parts" list and all the data is held and updated by a separate database program. It's comma delimited so that dbman can use it. I've used dbman like this before. The data itself gets updated every day so a static list (and some javascript) on a html page doesn't work. There are a 1000 records.

Perhaps I can reword my query....is there a way to have dbman do more then one search off a given page? If so, can you hook it up to some form of javascript, like onblur, so it searchs after someone enters some info in a field?

The end use is just to assure someone the part number they entered is correct:

24377h Aluminum pan
24356i Tin pan

etc.
Quote Reply
Re: [steven99] getting Dbman to search onblur? In reply to
Yep. Check out LoisC's FAQ for searching on more than one record at a time.

You could use the JavaScript with something like:

if (form.partNo.value == "24377h") {
form.partNodescription.value = "Aluminum pan";
}
if (form.partNo.value == "24356i") {
form.partNodescription.value = "Tin pan";
}

This would work if you only had *one* field to search on. Otherwise you'd have to do some kind of array and loop for each field - which is way above any of my limited javascript knowledge.