We can create a password validation using JavaScript. We need to validate a password every time whenever a user creates an account on any website or app. So, we have to verify a valid password as well as put the confirm password validation.Whenever a user creates a password, there is always one more field of… Continue reading How to confirm password validation using Javascript
Tag: javascript
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 shrink a header on scroll using javascript
Step 1) Add HTML: Create a header: Example code: Step 2) Add CSS: Style the header: Example code: Step 3) Add JavaScript: Example code:
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 Create a Form Dynamically with the JavaScript
We can use document.createElement() to create the new elements and use setAttribute() method to set the attributes of elements. Append these elements to the element by appendChild() method. Finally append the element to the element of the document. This example creates a Registration form.
Creating Progress Bar using JavaScript
A Progress Bar is used to depict the progress of any task which is being carried out. Progress Bars are generally used to show the download and upload status. In other words we can say that, Progress Bars can be used to depict the status of anything that is in progress. To create a basic… Continue reading Creating Progress Bar using JavaScript