I have a problem with including a large(ish) html file in a form which may be solved by updating an html file resource, or it may be solved by using another, more suitable solution. You be the judge…
OK, I have a large amount of HTML generated by an agent. Let’s say it is possible that it is more than 32K - so I can’t store it in a text field and use DBLookup.
I could store it in rich text and use a WebQueryOpen agent to import it, but this isn’t ideal because I want to embed this particular bit of HTML in quite a few different databases.
So, I thought the easiest way would be to save it as a file, and use the SSI-like functionality that ND6 provides - using embedded html file resources (No, notes won’t do server-side includes into forms from what I’ve read).
That all works well if the file never changes, but what if I would like to re-generate the file with my agent, replace (or refresh) the resource, and have the pages with the embedded file refresh immediately? Is there a way for me to do this in LotusScript? Bear in mind that I want to put code in other databases to pick up this resource as well.
Or, am I going about this the wrong way altogether?
Subject: Auto-refresh an HTML file resource (Or gimme a better SSI option!)
Have you tried looking at the DXL Importer. I would probably recommend getting an agent to generate a DXL file. And then use the DXP Importer to overwrite the existing design element. If that is the way you want to go about it.
Another option would be to generate a javascript file, not a html file. And then include this file in the HTMLHeader of your form, and then use some client side javascript to output the file at the client.
Or maybe client side xml ?? , but that depends on your browser.
Subject: RE: Auto-refresh an HTML file resource (Or gimme a better SSI option!)
Thanks Simon, much appreciated.
I’ve tried the JS and client side XML options, but probably not what I’m looking for here. Too many quotes in my html, but if that’s the only solution I’ll go that way.
I’d actually be quite keen to use the DXL option for this, however I’m not sure about how the text in the file gets encoded into what shows up in the DXL for a file resource. Try it for yourself. The file seems to be stored in a field called $FileData, which contains a big long string of characters.
I couldn’t make any sense of it, but I did notice the word Dog in there twice.
Does anybody know how I would start with my file (Or even a string with my HTML in it) and then convert this into the correct code so I can put it into the DXL and import this into my file resource?