Adding a popup into login page of Ecommerce website for specific customer. It’ll render a Popup into Login page when customer tries to login into his/her account. This loginpopup function will call the event in the login file just after clicking into Login button in the login page. And layout variable will get the layout… Continue reading Adding popup into login page.
Tag: javascript
Using this keyword in JavaScript.
this keyword in JavaScript is a The value that this stores is the current execution context of the JavaScript program. Thus, when used inside a function this‘s value will change depending on how that function is defined, how it is invoked and the default execution context. this always holds the reference to a single object, that defines the current line of… Continue reading Using this keyword in JavaScript.
Async functions
An async function is a function declared with the async keyword. Async functions are instances of the AsyncFunction constructor, and the await keyword is permitted within them. The async and await keywords enable asynchronous, promise-based behavior to be written in a cleaner style, avoiding the need to explicitly configure promise chains. Async functions may also… Continue reading Async functions
Return Value From Array Using Value of Another Key
The following function can be used to return value from an array by giving another key and value.
Cookies inside SuiteScript
Function to read cookie Function to clear or delete existing cookies Function to set cookie
Credit card validation using client script
This script will help you validate credit cards using client script. we have covered different card type validation here.( American express. master card, visa, discover )