Tuesday, April 21, 2009

Image served out by Domino not visible in browser – Help needed!

I’ve been working on some enhancement to SDMS (a freeware “simple document management system” with built-in NotesTracker), and have encountered a Domino web design issue that I haven’t been able to nut out.

So I’m now calling for assistance from all you Domino web design wizards out there whom I know do far more IBM Lotus Domino web design than myself and who have in-depth knowledge/experience with how Domino serves out Rich Text images to the web. None of the many blog posts and forum discussions that I’ve scoured seem to be tackling quite the same browser image-handling issue that I’ll describe below.

I’ve done a fair bit of research on the matter, but haven’t quite crack this one. Perhaps I’ve overlooked some basic Domino web design point – which would be far from first time for me -- but I suspect it might be one of those quirks of the Domino web server that irritate us.

My aim was to add four new user-editable fields to the SDMS Profile document so that, in both Notes Client and Web Browser environments. they would appear at the top of each SDMS window alongside the previous three plain text heading lines.

The four fields are labeled A, B, C and D in the following two images (Notes Client on the left, web browser on the right, click an image to enlarge it):


Fields B, C and D are plain text fields that display without problem in both environments. Change them in the SDMS Profile document and the changed value displays in the Notes Client or browser.

The problem that I’m having is with Rich Text field A. This is intended to act as a container of a user-selected logo image to better represent or brand a given SDMS database. (In current versions of SDMS, this is a static image of my own Asia/Pacific Computer Services logo, and I want to allow users now to be able to override this with an image of their own choosing.)

I use the following code to retrieve the logo image and display it on the form (inside the top frame of the frameset):

temp_Logo := @GetProfileField( "SDMS_profile"; "Logo" );
@SetDocField( @DocumentUniqueID; "Logo"; temp_Logo )

These formulae work fine for the Notes Client, but fail miserably for the web browser client.

All that appears is the dreaded image download placeholder, which I’ve highlighted in yellow in the above right illustration.


I just cannot get the logo image to display in a browser. I’ve tried several browsers (IE8, Firefox 3, and others) with the same result regardless of which browser.

The image placeholder has properties like in the third illustration.

If I save a different-sized image in the SDMS Profile document, the dimensions property at F changes to match the new image, and the image placeholder correspondingly changes shape.

Thus the Domino server (HTML task?) must be retrieving the image file, but why doesn’t it actually display the image in the browser window? As you can see at point E in the illustration, curiously the image’s URL consists of everything but the image filename.

What’s going on under the covers? Is it some quirk of the Domino HTML task that prevents it in some subtle way from being able to handle/display an image retrieved from a Rich Text field?

I was toying with writing some LotusScript that would store the image file into a database Image Resource object that had a fixed filename, but couldn’t see any script class with a method for doing this. Is there any way to accomplish such a feat? Besides which, why should I have to go to so much extra trouble when the text fields are being displayed without drama (via the simple @GetProfileField and @SetDocField formulae) yet the image stored in the Rich text field isn’t?

So guys and gals… Please HELP, HELP, HELP!


  1. This comment has been removed by a blog administrator.

  2. Only as a suggestion, try to publish your website as a virtual server in Domino and look if it works.

  3. I sometimes use the same principle in Notes too, but use @GetProfileField( "SDMS_profile"; "Logo" ) directly on the form, instead of 'pushing' it to another doc. There are severe limitation doing this with a RichText field (no formatting, no attachments).
    What I do on the web instead is (and certainly for a Content mgt. system) the have form containing a 'code' (for lookup) and a richtext field with an attachment. The user can create documents with this form, and create e.g. a 'image' doc with code 'Logo' and the attachment being the logo itself. Then you can just reference this an an IMG tag in the web form. Easy to do, and completely open the the user. BTW I use the same principle (but not an attachment, but the real content) for CSS sheets.
    Hope this helps.

  4. Theo is right. Don't use a RT field in the web but a computed for display field that points to the logo attachment stored in your setup document. Let's presume it is logo.gif and your setup document is in a view setup (the only doc). Then your computed field would be:
    "[<img href=\"/"+@webdbname+"/setup/$first/$file/logo.gif\" border=\"0\">]"

    :-) stw

  5. I was looking for information on Image served out by Domino not visible in browser and before ending in your blog I watched like 10 sites about generic viagra, web is full with that topic. But anyways the info on your site help me very much, thanks for the post and have a nice day.

  6. This comment has been removed by the author.