Sunday, April 1, 2001

Flash, ergonomics, and responsible tip writing

LETTERS TO THE EDITOR

In this month's Letters to the Editor, one reader has a question about Flash, another has some tips on where to find great ergonomic products, and a third voices his opinion on a recent tip mailing.

Hotspot on a Flash object

The following letter was written in response to Razzak Khan's article, "Putting some Flash into your Domino applications," in the January 2001 issue of DominoPower at http://www.dominopower.com/issues/issue200101/flash001.html.

I have read your article regarding putting some Flash into Domino applications from the DominoPower site. It's very helpful, but I have a question related to it. I want to put a hotspot on the flash object that I have embedded on my form, and this hotspot uses some Notes formulas, like refreshing the document or running an agent. Is it feasible to do this? If so, how can I do this? And, if not, is there another way to use Notes formulas with the flash object?

Thanks in advance,
Amal EL-Marsfawy
PCLP Domino 4.0 Application Developer
CLP Domino 5.0 Application Developer

Razzak Khan responds

To answer your question, the simplest way I would recommend is using JavaScript. If you follow my example in the February issue of Domino Power (at http://www.dominopower.com/issues/issue200102/flash0201001.html), you'll see how to implement JavaScript.

In the first case of refreshing the document, here's some insight:

With the radio button question, there's an option in the properties called "refresh fields on keyword change." Check that, and your page will refresh on a click.

To do a refresh in JavaScript you can use the doClick function.

Take a field on your form, radio button, check box, and list box. For any field that has the option, "refresh fields on keyword change," temporarily turn that option on and load your form on the Web. View the source, and you'll see a doClick function where that field is. It will look something like this:

_doClick('$Refresh', this, '_self', '#_RefreshKW_FieldName')

This is a JavaScript function that will refresh your form. Copy this code. You can turn off the refresh fields on keyword change for the field you got the code from. Paste the code in any JavaScript event where you want the form refreshed. Just make sure you have a field on your form with the name that's in your doClick function.

And if you wish to run Agents, assuming you've developed Flash for a Web site, then I would take advantage of the WebQuerySave and WebQueryOpen Agent feature of Lotus Notes. As you're aware, you'll be able to run an agent if the Lotus Notes document has been refreshed... so your refresh JavaScript could serve both of your requests.

I hope this helps and makes some sense! Good luck, and let me know when your site is up!