How to prevent reloading the page multiple times in workspace
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2026 07:51 PM
Hi,
I am using the below server script and client script within UI action, is there a way I can prevent reloading the page multiple times. Actually want to reload only when first if statement is true.
Thanks,
Server script:
var util = new KeywordRoutingUtil();
var result = util.evaluateRouting(current);
if (result.abort) {
gs.addErrorMessage(result.message);
gs.setRedirect(current);
} else {
//current.update();
gs.setRedirect(current);
current.insert();
}Client Script:
function onClick(g_form) {
g_form.submit('save_action');
g_form.reload();
}