Manage Learn to apply best practices and optimize your operations.

Refreshing forms on the Web

The Notes Client paradigm is not easily emulated on the web. But with a few behind-the-scenes tricks, you can implement the most powerful hide-when and computed field functionality - without saving the document until you're ready.

Some Notes Client functionality is automatically available on the web. For example, when you have a radio button with two possible values, and it is set to refresh fields on keyword change. Domino achieves this in the browser using JavaScript with a special function called _doClick(). Basically, when you change the value of the radio button, the _doClick function tells Domino which field has been clicked. This allows Domino to re-compute the form based on the new field value. In addition, it returns the form to the browser with an anchor-link so that the browser scrolls down to the field that has just been clicked.

Now to put this knowledge to work. Lets say we have a collection of computed-for-display fields similar to a mini-spreadsheet on our form. We also have one editable field that is used in the formulas of the computed fields. Lastly, we have a refresh button so that changes in the editable field take effect in the computed fields.

The JavaScript code behind the button is:
_doClick ('refresh', this, null, null)

This code alone will refresh the form without submitting it.

Now, to make the browser scroll down to where we previously were, we need to create a pass-thru HTML code at the point we want to scroll down to:

<A NAME="anchor1"></A>

This is called an Anchor Link. For Domino to take advantage of it, the code must now look like this:

_doClick ('refresh', this, null, 'anchor1')

That's it! Don't forget to enable "Use JavaScript when generating pages" in the database properties.

Dig Deeper on Domino Resources - Part 7



  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...