JavaScript Code to Refresh a Form Keeping Field Values (Do Click - F9 Equivalent)

Mindwatering Incorporated

Author: Tripp W Black

Created: 03/02/2002 at 08:05 PM

 

Category:
Notes Developer Tips
Forms/Subforms

Domino form / document refresh using JavaScript:

Better Option (Domino6 + ):
if(ValidationFunc()==true) {
return _doClick('$Refresh', this, null);
}

Note:
A longer version to specify a frame and what field to base refresh on:
return _doClick('$Refresh', this, '_self', '#_RefreshKW_' + 'somefieldname' );


Workaround for custom JS validation and submit form w/o _doClick:
if(CheckAllFields() == true) {
GetJSEditorData(); // used with the JS digi JavaScript Control RTF field
_getEditAppletData(); // used with java applet RTF field
//_doClick('$Refresh', this, null); // uncomment to do refresh instead of submit
f.submit();
}


Old Option:
document.forms[0].__Click.value='$Refresh';
document.forms[0].submit();"




previous page