< Back

Document Subject: Show images or image search results in a lotus notes client
Hint Short Cut: Add this to your code & documentation to help you find this page.
http://#ClientViewWithImages or http://A555F9/nn.nsf/ByAlias/ClientViewWithImages

How to code a "view" in the notes client that shows document's images. How to create a graphical search results page in the client. How to select items in an html page shown in Notes client and then use that data with a notes agent, ie: interact between Notes client and a web page displayed in the Notes client.




Introduction and Background

A customer needed to store product packaging pictures and artwork and allow the pictures catalogue to be searched, ie all images that were to do with a certain product had to be displayed. This had to be done in the Notes Client. The resulting images also had to be selectable and then downloaded to the client's machine. Tricky.

When I first saw this, I thought it would be impossible, but I managed to solve it for versions 5 & 6.

I broke this down into 3 problems:

 

Display the images in the Notes Client.

Notes views cannot display rich text or images.

Use Notes custom view icons to solve this: Needed to work in Notes 5 & how do you add resources on the fly anyway?

You can open a "web view" in the client, then you can use your web code in there.

ie write an agent that creates the view you want in a web browser, and then open the web page in the client using a frameset.

To create this I used a trick I found on Notes.net:
Store the URL to be opened in the environment variable “afCustomURL" and create a frameset called “EnviroFS” which has one frame that has a computed URL value of @Environment("afCustomURL").
The frameset is then opened in the Middle frame of the existing frameset.

The hostname needs to be the full hostname.

This actually works on a local database as well using localhost!

Will be added to.

Search facility

To be documented.

Allow user to select documents on the "view" or web page in the client and then run a notes agent on it

I also worked out how to allow the user to select the document/graphics from the "view" and then run a notes action on it using cookies and perweb.nsf and the notes:// functionality. Worked in R5 and R6.

To be documented more!

-Adam Foster
http://AdFos.com