I have used GetDocumentByURL (LotusScript) to get a web from the \domino\html directory and create notes documents in a database with the web content being held in the Body field (rich text). These document will then be viewed on our Intranet. Documents are created fine and these can be viewed on the Intranet but for some reason the rich text field is limited in size and scroll bars are available to view all of the content.
I have found that by opening the documents in Notes, I am able to edit the document and then resave it and as if by magic the rich text field fills the whole page on the web and doesn’t have scroll bars!!! i.e. the content of the rich text field appears on the page with the rest of the fields and isn’t in it’s own field with scroll bars.
The problem I have is I am doing all of this in a domino agent which runs on the server, on schedule so I can’t use the front end classes to open the document and resave it!
Any ideas anyone cos I have been scratching my head most of the day on this one!#
Cheers in advance to the smart arse who can tell me what to do.
It sounds as though you are generating a MIME Body that has content type text/html. If the text/html contains certain tags (like HTML) the web server will create an iframe and point the source at the body item. This would account for what you are observing (If you use “view source” in your browser you should be able to see the iframe)
When you edit the item with the notes client, the client is converting the html to richtext and changeing the body item to type composite.
If you scan your html before putting it into the item and remove tags like HTML, HEAD, BODY, and FRAMESET then the web server can include the html inline with the rest of the document.
Someone else may be able to tell you if there is a way to have the html to rich text conversion happen directly in the LotusScript.
Subject: RE: scroll bars on rich text fields on web
Thanks for the responce. That sounds good as yes there is indeed an iframe tag put into the generated HTML for the documents that are not showing correctly. Meanwhile it is removed in the corrected documents.
Unfortunately I have tried removing the HTML, HEAD,BODY, and FRAMESET tags but it didn’t fix the problem! Is there any other tags that require removal? Or another way to do this in LotusScript would be good.