Manage Learn to apply best practices and optimize your operations.

Function To Handle JS Error

When you use JS function to validate a form and a JavaScript raise an Error, you validation script abord and the document is save with invalide data.

Here is the solution:

On the form put the fields
SaveOptions Editable
Value "1"
HTML ATTRIBUT "type=hidden"
Hide When [Notes] && [READ]


function OnErrorHandler(msg, url, lno) {
// Trap error , Do not save the doc
document.forms[0].SaveOptions.value="0";
   return(true);
}

function ValideMe(form){
//validation du formulaire 
window.onerror = OnErrorHandler
if(isEmpty(getFieldValue (form.XICOVR,"text") )){
    alertBox (form.btCOVR, msg, "buton" )
      return(false);
}
//.............
// You validation Code goes here
//
return(true);
}

Dig Deeper on Domino Resources

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