How to use Javascript Window Blur() and Window Focus() Method

Javascript Blur() method is used to remove focus from the current window. i.e, It sends the new open Window to the background.If click on the blur window button then the site.org page will move to the background. Whereas Javascript focus() method is used to focus on the new open window. i.e bringing back the blurred… Continue reading How to use Javascript Window Blur() and Window Focus() Method

How to display quantity pricing as a table, dropdown & quantity box according to individual items in the pdp page

To display quantity pricing as of table and dropdown, we have to first create a field and passing those values through Netsuite. Then need to create sub filed value for eg: (Normal quantity pricing & Enhnaced quantity Pricing). We have create a var in the proper view for getting the values there as True/ false.… Continue reading How to display quantity pricing as a table, dropdown & quantity box according to individual items in the pdp page

How can we display the child subsidiaries in the site if it is showing only parent subsidiary

If we want to show the child subsidiaries in the site when only parent subsidiary is showing than we can use nLapi in the SuiteScript by creating a variable. Sometimes even when the subsidiaries are created in the Netsuite , it will not display in the site. In such case we can use this method… Continue reading How can we display the child subsidiaries in the site if it is showing only parent subsidiary

Validation of file size while uploading using JavaScript

We can implement file size validation by checking file size before uploading using Javascript. For eg: If we don’t allow uploading a file more than 4MB or less than 2MB, we could use validation to check that the file the user has chosen follows the given requirements and if it doesn’t, give them a message.… Continue reading Validation of file size while uploading using JavaScript

How to force Input field to enter numbers only using JavaScript

As there are many ways to force the input field to take input-only numbers. The two methods by which we can do one of which is using by ASCII code and other is by using the replace() or isNaN() fn. First method : The example below illustrate Input[type=”text”] allows only Numeric Value using Javascript with the help… Continue reading How to force Input field to enter numbers only using JavaScript

How to use Checkbox inside Select Option using JavaScript

We can add the Checkbox inside select option using JavaScript. First we have to select element that shows “Select options” and also create a div that contains CheckBoxes. And according to it add javaScript functionality which is called when the user clicks. For eg: In script part added javaScript functionality which is called when the… Continue reading How to use Checkbox inside Select Option using JavaScript

JavaScript pattern matching using Regular Expression(RegEx)

If we want to match special character, meta character or using quantifers , we can do that by regular expression. For eg. If we want to match date , time or any particular pattern or complex things we can use it. Regular expressions allow you to check a string of characters like an e-mail address… Continue reading JavaScript pattern matching using Regular Expression(RegEx)

How to detect whether a device is iOS without using Regular Expression in JavaScript

We can detect whether the device is iOS or not without using RegExp with the help of JavaScript. There are two approaches first is Use navigator.platform property to check for the particular keywords which belongs to iOS devices using index of( ) and second is using pop() to take out one by one Approach 1: Use navigator.platform… Continue reading How to detect whether a device is iOS without using Regular Expression in JavaScript

How to Toggle Password Visibility in JavaScript

When we use a password field in the code, it might be well known that it is visible as ‘*’, which is a security input for the user described password code. So, when the user inputs the password in the password field, it gets input in the form of ‘*’ characters hiding the actual characters… Continue reading How to Toggle Password Visibility in JavaScript

How to create an image element dynamically using JavaScript

We can create image element and append it to a document using JavaScript so that when someone clicks on the button the image will be created. We can get this by Approach: Create an empty image instance using new Image(). Then set its attributes like (src, height, width, alt, title, etc). Finally, insert it into the… Continue reading How to create an image element dynamically using JavaScript