How to resovle the “ReferenceError: event is not defined” in javaScript events

This error is thrown when you try to access a variable that is undefined or is outside the current scope. If you’re getting this error when using the event handling system, make sure you use the event object passed in as a parameter. Older browsers like IE offer a global variable event, and Chrome automatically… Continue reading How to resovle the “ReferenceError: event is not defined” in javaScript events

How to get the current screen size/browser window with JavaScript

We can use window.innerWidth and window.innerHeight to get the current screen size of a page. Window.innerWidth The read-only Window property innerWidth returns the interior width of the window in pixels. This includes the width of the vertical scroll bar, if one is present. More precisely, innerWidth returns the width of the window’s layout viewport. Example:var… Continue reading How to get the current screen size/browser window with JavaScript

Add a custom field in the Sales order and fill the field with value from website.

Requirement is to show a custom field in the SO and the value from the website should be show in that field. step 1: Create a transaction body field. Customization -> List,Records&Fields -> Transaction body fields -> new step 2: Add the created custom transaction body field in the configuration record. Otherwise we cannot get… Continue reading Add a custom field in the Sales order and fill the field with value from website.

Remove item in Checkout

Add a removal icon to item cell of the checkout. When the icon is clicked, the item will be removed from checkout page Entry point In the corresponding theme file where u need to remove add the correct data action in it

TypeScript and JavaScript

TypeScript JavaScript A typed language that catches compilation errors early on You can find out errors during runtime Suitable for large projects as it improves code maintainability and readability As more code is added, becomes difficult to test and debug, thus JS is suitable for small projects Superset of JS, i.e., features like object-orientation, type-checking,… Continue reading TypeScript and JavaScript

Adding Loading symbol while processing

Scenario: When some process is processing if you need to show any kind of loading symbol for representing the process may take some time. For this you need to add a loading symbol on the page Solution: For this you need to add a jQuery section with a HTML code block. The HTML code block… Continue reading Adding Loading symbol while processing