Multi-DB quick search

If you are using a multi-db search database and want to incorporate a quick-search on your pages, try this.

If you are using a multi-db search database and want to incorporate a quick-search on your pages, try this. HTML

Piece:

Highlight the following and pass-thru HTML
<FORM NAME="qSearch" onSubmit="return false;"><INPUT
TYPE="text" NAME="Query" ALIGN="center" SIZE=12
VALUE=""></form>

NOTE: If you are embedding this QuickSearch form into another form, you will need to add a </Form> before the opening <Form Name= . . .> tag above.

Javascript Piece:
Add this to the JSHeader

function qSearch() {
f = document.forms(0)
startURL = "/YourSearchDBName.nsf/$$search?searchsite&query="
qString = f.Query.value if ( qString == "" ) { alert ("ERROR! No Query String Found\nPlease enter a Query String and
try again."); f.Query.focus(); return false; } parent.location.replace( startURL + qString); f.Query.value=""; return false; }

Now call the qSearch() function from a button, an imported graphic or a text action link.

NOTE: If you are placing your quick search in one frame and want to target another frame for the results, use the following syntax parent.YourFrameName.location.replace( startURL + qString)

This was first published in April 2002

Dig deeper on Domino Resources - Part 6

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close