"JavaScript is only supported in documents"

I am attempting to use passthrough HTML in the Notes client to provide outline-like functionality. The idea is that, in addition to using an outline for fixed design elements, I will also display a computed text which contains a set of anchor tags to customize the experience for the user without having to fiddle with folders, DXL, rich text etc. The effect I am after is:

Outline here

passthrough link1

passthrough link2

View here

The anchor tags will call click() on hidden buttons, passing them simple values like unids or view names etc, thus serving as a simple history feature or folder pane. For very simple links this method is simpler than using the DXLimporter to create the same effect with rich text, and there’s no need for a folder or embedded view.

Computing the HTML and JavaScript is no problem. Unfortunately, when you host the resulting JavaScript in a frame, it does run, but then Notes displays a messagebox saying “Javascript is only supported in documents.”

Take the form out of the frame and click on the JavaScript link, no messagebox.

If you hard-code the JavaScript onto the form, it works fine in the frame.

In sum, when rendering passthrough JavaScript in a frame, the Notes client runs the JavaScript OK but then displays a seemingly pointless messagebox.

So I’m to do this feature with DXL instead. It’s just annoying that something that would be so easy is made unusable because of that useless messagebox.

Subject: “JavaScript is only supported in documents”

If it works, but is giving you a meaningless error; why not just disable JavaScript error dialogs.

Go to File->Preferences->User Preferences. Under Additional Options, look for Enable JavaScript Error Dialogs. It should be roughly the 8th item from the top. Just uncheck it, and you shouldn’t get that message.