Manage Learn to apply best practices and optimize your operations.

Quick Search Facility On The Web

With the Notes client, a user can easily "jump" to a specific document in a
view by typing the first letters of the categorized/sorted column. This avoids
scrolling down/up several times.

However, on the web, a view is displayed by pages and we can only provide users
with a "next" and a "previous" button to display the next or previous n
documents. Inserting the following Javascript code and html entry field/button
in the $$ViewTemplateDefault allows you to "mimic" the Notes quick search
function on the web.
Javascript code :
-----------------
&LTSCRIPT LANGUAGE="JavaScript">
<!-- Hide from JavaScript-Impaired Browsers
function setfocus() {
document.DirectAccess.searchText.focus();
document.DirectAccess.searchText.select();
}
function goto() {
isView=window.location.href.indexOf("?OpenView")
if (isView == -1) {
txt=document.DirectAccess.searchText.value;
window.location.href=window.location.href + "$DefaultView?OpenView&StartKey=" +
txt
} else {
curUrl=window.location.href.split("?")
curUrl2=curUrl[0]
txt=document.DirectAccess.searchText.value;
window.location.href=curUrl2 + "?OpenView&StartKey=" + txt
}
}
// End Hiding -->
</SCRIPT>


html entry field and text :
---------------------------
&LTFORM NAME="DirectAccess" onSubmit="goto();return false;">&LTINPUT TYPE="text"
NAME="searchText" SIZE=11 VALUE=""> &LTINPUT TYPE="IMAGE" SRC="/gifs/sear.gif"
BORDER="0" ALT="Search" onClick="goto()">
</FORM>

code to be added in the html head :
-----------------------------------
ONLOAD=setfocus()
This was last published in November 2000

Dig Deeper on Domino Resources - Part 5

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

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 ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close