Running an agent when $$ReturnGeneralError loads

Hi, i’ve got a HelloWorld agent that i’m trying to invoke in the $$ReturnGeneralError form, so that every time someone hits a dud page on my website, HelloWorld gets invoked.

Turns out I can’t call agents on $$ReturnGeneralError’s WebQueryOpen (unless, of course, i’m specifically calling the $$ReturnGeneralError form), as far as I understand. It’s like as though only the “physical” form is loaded by the web-server, and the underlying functionality is ignored, like as though the form is not even a form at all.

Anyone know the rationale behind disabling the WQO on $$ReturnGeneralError? Anyone know what I can do to invoke my agent when the form loads? (Jeez, have a read of that last sentence. Why am I forced to be asking questions like this, Lotus? It’s like, “I have a 404, i’d like Operation A to occur. Why is this so hard?!”)

If your question is, “Where do you want your ‘hello world’ to output to?” my answer is, “Either to the server log, or in an arbitrary document.”

Vitriol withdrawn if there’s a simple answer that I was unaware of.

Love,

JOE

Subject: Running an agent when $$ReturnGeneralError loads

Hi Joe, have you tried to provide your own $$ReturnGeneralError form with:

  1. An embedded

Subject: RE: Running an agent when $$ReturnGeneralError loads

Thanks for your response Robin. However, given the nature of our readers (who don’t use conventional browsers, but use screen-readers specifically developed for them), for accessibility reasons we’re not allowed to use Javascript or frames.

So, any way I can kick off my HelloWorld when our users get a 404 WITHOUT Javascript or frames, or any other client-side hacks?

Really, it shouldn’t be this difficult. As much as I appreciate your feedback Robin, why do we always have to come up with freaky work-arounds (secret, client-side, embedded frames that fire off server-side agents) just to get the most basic of functionality, like starting a server-side HelloWorld when someone gets a client-side 404.

WHY!?

Subject: RE: Running an agent when $$ReturnGeneralError loads

This has been reported previously, but it was determined that it’s working as designed. Apparently the web-server developers feel that an error report page doesn’t really require sophisticated coding. You can still use formulas for computed fields and computed text, and that lets you do an awful lot. As a workaround, that’s not really so arcane – fairly obvious, in fact.

If you can’t figure out how to do what you want with a formula, describe your user requirement here to see whether someone has an idea.

I don’t understand the restriction against JavaScript. Certainly, there are things you can do with JavaScript that cause accessibility issues, but there are also also lots of ways to use it without a problem. For instance, inline JavaScript that uses document.write as the page loads, is never an accessibility issue (unless the HTML it generates is flawed – but you don’t need JavaScript to write poor HTML). If your company has an dumb policy that artificially limits you, how is that IBM’s fault? If you’ve developed a browser that doesn’t conform to modern standards for a web browser, by not supporting any JavaScript, then again, it seems like your issue.

And incidentally, you can call an agent by its URL from passthru HTML in your form by using it as a “src” for something – a stylesheet link, for instance. The agent can just print the content headers and a blank line or comment, so no actual styles are affected. This doesn’t require any JavaScript. Or, if it needs to return data into the document, and your IT policy makers get their heads straight, then the agent could output some JavaScript code that assigns variables to be incorporated into the page by document.write wherever needed.

Or, you can make a redirect in the meta information on the error page that immediately switches to a normal form, causing that form’s Webqueryopen to run.

So you have lots of options, and nothing I’ve mentioned here is a dark secret. It’s all right there if you read the documentation, and think about it a little.

If you feel that what you’re doing can’t be done with formula or any of the other ways mentioned above, and really makes sense to do on an error page, you might call Lotus Support and mention SPR #ESIS4ZLTN4.

In 8.5 I believe you should be able to use an XPage for this, and they are very programmable and straightforward. So IBM has already responded to your desire for a more coherent web design architecture. Note that you can upgrade a web server without necessarily upgrading Notes clients that access that server.

Subject: RE: Running an agent when $$ReturnGeneralError loads

Andre, thanks again for your support. Just to fill you in:

The browsers our (visually impaired/blind) users use are called ‘screen readers’. It’s not our organisation’s “dumb” policy not to implement javascript. It’s the older versions of these screen readers that our users use, which don’t support javascript. So, as part of our commitment to the Royal National Institute for the Blind (RNIB), we’re restricted from using javascript.

Yep, our users have probably the world’s thinnest clients. We can’t have fancy AJAX kick in to kick off my server-side agent. A significant percentage of our users are looking at things we wouldn’t even consider as monitors.

So, as much as we’d love to put some of our functionality on the client-side, we can’t rely on their browsers whatsoever, nor can we rely on anything beyond pure HTML, considering we don’t know what screen readers will be supporting in future versions. Heck, we can’t even rely on 90% of the HTML generated by v6.5.5. (v6.5.5 generates many deprecated tags, and doesn’t allow enough flexibility for manipulating the HTML tag attributes that we require to appease the RNIB.)

So, to that end, I LOVE what you said in the last paragraph. YOU’VE JUST MADE MY DAY… all we need now is 8.5 to be rolled out.

As for my requirement to have a server-side HelloWorld come up at every instance of a client-side 404, I guess i’ll just have to explain to our client that our CMS just doesn’t do that right now, and we’re waiting for the latest version from our vendor.

Regardless, I do always appreciate your support, Andre.

Subject: RE: Running an agent when $$ReturnGeneralError loads

Hi Joe,

the option of using an automatic redirect or an