Manage Learn to apply best practices and optimize your operations.

Computed looking/acting text fields

Ever wish you could use a Notes computed field but you are using JavaScript to do your calculations?

Ever wish you could use a Notes computed field but you are using JavaScript to do your calculations? Fear no more, here is the solution.

1) Put a (CSS) style sheet at the top of the page (cut/paste (a) from code below) and make it pass through HTML.

Create your field that is to be calculated using a JS function. Make it Text and Editable. Then go to the HTML tab for the field and in the Style section put "border=0" without the quotes. Then in the Class section put "computedFld1" without the quotes.

Then replace the "CornflowerBlue" in the CSS with whatever color you are using as your background. A great site for converting hex to rgb and reverse is: http://www.yvg.com/twrs/RGBConverter.html

Then, to make sure that the field will not be edited, in the onFocus event for your field, put the code from section (b) below. If someone tries to enter the field, they will be redirected to the other field.

Your field will not have borders, it will calculate when you run your JS functions/calculations and no one can edit the field manually. Tadaaa. Looks and works just like a computed field, just for Javascript!

Enjoy!
Mike


(a)

<style type="text/css">
.computedFld1 
{ 
background-color : CornflowerBlue;
}</style>

(b)
document.forms[0].ANOTHER_FIELD_NAME.focus();

Dig Deeper on J2EE for Lotus Notes Domino and WebSphere

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com'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 ...

SearchDataCenter

SearchContentManagement

Close