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>
<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()
{
location=document.gpdlocation.example.options[document.gpdlocation.example.selec
tedIndex].value
}
//-->
</script>
</form>

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⋆tkey=";
blah := "<option value= \"" + pathandview + @Left(values;3) + "\"" + ">" +
values + "</option>";
@Implode(blah;@Char(13))
This was first published in November 2000

Dig deeper on Domino Resources

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:

-ADS BY GOOGLE

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