Manage Learn to apply best practices and optimize your operations.

Override Domino Submit

Domino 4.6 introduced the option of using JavaScript when generating a page.
These pages have links that execute a _doClick() function, which submits the
form to the Domino server along with an action for the Domino server to carry
out. You can override the _doClick() function generated by Domino and insert
custom processing, such as field validation without a server round trip, with
the following code.

Notes:

1. The form's HTML attributes should be set to
"onLoad=\"RedirectDominoSubmit()\"" .
2. The function b_Override is included as a simple validation example. If the
function returns false, the usual Domino action is aborted.
3. This solution is a simplified version of the SubmitOverride object available
from Process Stream Technologies, and may be freely distributed. The actual
object uses a similar technique to provide override behavior that depends on
which button or link was clicked.
&LTSCRIPT LANGUAGE="JavaScript1.1"><!--
function RedirectDominoSubmit()
{
if( typeof _doClick == "function" )
{
DominoSubmit = _doClick;
_doClick = PreSubmit;
}
}

function PreSubmit( v )
{
if( b_Override() )
DominoSubmit( v );
}

function b_Override()
{
// Custom processing, such as field validation goes here
var hInput = document.forms[0].t_Text;
if( hInput.value == "" )
{
alert( "Please enter a value!" );
hInput.focus();
return false; // don't do the standard Domino action
}
else
return true; // do the standard Domino action
}
//-->
</SCRIPT>

Dig Deeper on Lotus Notes Domino Administration Tools

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