How to clear the form after submitting in Javascript without using reset

The form allows us to take input from users and manipulate it at the front end or backend side of the application. Also, to provide a good user experience to the application user, we need to reset all the form data once the user submits the form. Example:  In the example below, we have created… Continue reading How to clear the form after submitting in Javascript without using reset

Get an attribute value from object using javascript and jQuery

The attr() is a function of jQuery It’s not a native function of Javascript. Below shows how to get the same information using both jQuery and Javascript: Javascript: The getAttribute() method of the element interface returns the value of a specified attribute on the element. If the given attribute does not exist, the value returned will either be null or “” (the empty… Continue reading Get an attribute value from object using javascript and jQuery

How to create an image map in JavaScript

JavaScript can be used to create a client-side image map. An image map is an image on the webpage that has multiple links to other pages. These links are called hotspots. An image map is used to navigate different links to other pages or on the same web page. Step 1: The first step is to… Continue reading How to create an image map in JavaScript

How to create animations using JavaScript

JavaScript animations are done by programming gradual changes in an element’s style. Basic Web Page To demonstrate how to create HTML animations with JavaScript, we can use a simple web page. Example Code: <!DOCTYPE html> <html> <body> <h1>My First JavaScript Animation</h1> <div id =”myContainer”> <div id =”myAnimation”>My animation will go here</div> </div> </body> <html> Styling the Elements To make an… Continue reading How to create animations using JavaScript

How to create a popup chat window with CSS and JavaScript.

A live chat pop-up helps customers connect with your business and can enable co-browsing, an efficient way of working through any issues they’re experiencing. Step 1) Add HTML Use a <form> element to process the input. Example Code: <div class=”chat-popup” id=”myForm”>   <form action=”/action_page.php” class=”form-container”>     <h1>Chat</h1>     <label for=”msg”><b>Message</b></label>     <textarea placeholder=”Type message..” name=”msg” required></textarea>     <button type=”submit” class=”btn”>Send</button>     <button type=”button” class=”btn cancel” onclick=”closeForm()”>Close</button>   </form> </div> Step 2) Add CSS Example Code:… Continue reading How to create a popup chat window with CSS and JavaScript.

Troubleshoot JavaScript and Suitescript Performance with Console Timers

We may experience delays in the execution of our Suitescript or JavaScript, It will be very tricky to find out where the things are going wrong. Fortunately for us, there is a timer feature built into JavaScript that we can use to track how much time has elapsed between two arbitrary points. In combination with events,… Continue reading Troubleshoot JavaScript and Suitescript Performance with Console Timers

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