Search from an input text field on a document

I am creating a new intranet for our company.I want the intranet-pages to be created as notes-documents, so people with only the notes client can edit them.

Some of these documents contain views that can be searched.

I have then put this code on top of the view to simulate a field: .

Next to this, I have put a search button that initiates a javascript search function, which I have put in the editable $$HTMLHead-field.

In the bottom I have a hidden Notes field called “Query” which inherits the value of html-field.

This works nicely a long as you press the button.

But if you hit enter while in the html-Query field, you get an error. And if you hit enter with the cursor anywhere else on the document, nothing happens.

I have an editable $$Return field in the bottom of the document. I have written all sorts of code here with no avail.

I would like the javascript search code to be executed both when you hit the search button and when you hit enter.

I know this can be done from a Notes form, but can it be done from a notes document?

Subject: Search from an input text field on a document

I used the sample from Sandbox:http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/d417269499750dd88525673700542d85?OpenDocument

It’s the Notes.net Welcome Page template. There is a form called $$Search which might help you…

HTH,

Dan

Subject: RE: Search from an input text field on a document

It’s a little late for a response i guess, but better late than never.Dan, I tried to download the databse you suggested, but it didn’t have what I was looking for.

I ended up using a different form for the web.

This form has an editable notes-field for searching, all the other fields are computed with their own value, and the form opens automatically in edit-mode.

This way I can make both the search-button and the $$Return-field work.

But thanks for taking your time.

Karen