Simulate View Quick Search On The Web With Javascript And Computed Text

One of the biggest shortcomings I find with web-enabled Notes database is the
loss of Quick Search - the ability you have with a Notes Client to start typing
the value of the first sorted column of the view and have Notes jump to that
point in the view. This combination of JavaScript and computed text allows you
to do something very similar with a dropdown box. Stick this code in your
$$ViewTemplate design. Notice the use of computed text (<Computed Value>)
embedded in the JavaScript code
<form name="gpdlocation">
<select name="example" size="1" onChange="go()">
<Computed Value>
</select> <script language="javascript">
// When the initial listbox index changes,
// go to location equal to new index's value
function go()

Formula for Computed text used in JavaScript above. This code retrieves the
values in the first column of the view called CheatSheets. The dropdown list
values are built from the results of the lookup:
values := @DbColumn("":"NoCache";"":"";"CheatSheets";1);
pathandview := "http://" + Server_Name + "/"
+@ReplaceSubstring(@ReplaceSubstring(@Subset(@DbName; -1); "\\"; "/"); " ";
"+") + "/" + "CheatSheets?OpenView&Startkey=";
blah := "<option value= \"" + pathandview + @Left(values;3) + "\"" + ">" +
values + "</option>";

This was first published in November 2000

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
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
Sort by: OldestNewest

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:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.