Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Canvas promotes user experience in several ways, including visual indicators to represent the progress of the activity within the application.

Progress Indicators (i.e. load masks) are visual indicators of an activity or background process in an application. However, you might want to turn those off completely or want to show those only when the server response is not received within a specific timeframe.

Disabling Load Mask Completely

To disable the load mask completely, set the syncMode property to ‘false’ as shown in the following sample JS code snippet:

Code Block
languagejs
  var param = {
    "PAGE_CODE_TYPE" : 'ALERT_CODE',
    "INPUT_ACTION" : 'UPDATE_REFRESH_ACTION',
    "PRODUCT_NAME" : 'ALERTS',
    "INPUT_FUNCTION_CODE" : 'VSBLTY',
    "INPUT_SUB_PRODUCT" : 'ALERTS',
    "IS_FILTER_FORM" : false,
    "MSG_ID" : msgId
  };
  ct.Ajax({
    params : param,
    syncMode : false,
    success : function(responseP, optionsP) {
      widObj.refreshWidgetData();
    }
  });
Info

syncMode property is set to 'false' in above code snippet (line number 12).

Refer Displaying Load Mask based on Server Response

...

Even though Progress Indicators provide visual feedback to users, sometimes you might want to display those only when the server response time is longer. For example, displaying load mask when the data is not received from server within one second. You can achieve this using the following sample code snippet:

Code Block
languagejs
ct.env.options.loadMask.delayLoadMaskTimer = 1000; // unit is in milliseconds

The above sample code will display the load mask only when the server response is longer than one second, thereby shorter server calls (AJAX) will happen behind the scenes without a load mask and Disabling Load Mask for more information.

If suppose you need a customized load mask, you can do that too with Canvas Technology platform! Refer Custom Load Mask API for more information.