Posts

Showing posts from April, 2023

Dropdown Change Event in Angular | CodeLSC

Image
Dropdown Change Event in Angular Introduction In web development, forms are an essential element that allows users to interact with the application. One of the most commonly used form elements is the dropdown, which allows users to select a value from a list of options. In this blog, we will learn how to handle the change event of a dropdown in Angular using an example code. What is a Change Event? A change event is triggered when the value of an element changes, such as when a user selects an option from a dropdown. In Angular, we can handle this event using the (change) event binding. Code Explanation The following code is an example of how to handle the change event of a dropdown in Angula

How to Bind Remote Data to Dropdownlist using JavaScript | CodeLSC

Image
How to Bind Remote Data to Dropdownlist using JavaScript | CodeLSC   Implementing a Dropdownlist with Remote Data using jQuery AJAX Dropdownlists are a common UI element used in web applications to allow users to select options from a list. In some cases, we may need to populate a dropdownlist with data retrieved from a remote data source. This tutorial will show you how to implement a dropdownlist with remote data using JavaScript and jQuery AJAX. Requirements: jQuery library (version 3.6.0 or above) A remote data source in JSON format (for this tutorial, we will be using the JSONPlaceholder API)   HTML: The HTML code for our dropdownlist is very simple. We have a select element with an id of "postsDropdown" and one default option with the value "null". <select id="postsDropdown"> <option class="e-popup" value="null">Sele

Show/Hide Password Toggle with JavaScript | With Source Code | CodeLSC

Image
Learn how to create a show/hide password toggle using JavaScript and Font Awesome icons Introduction: Have you ever needed to create a password input field that allows the user to toggle the visibility of their password? With JavaScript and Font Awesome icons, it's easy to create a show/hide password toggle that makes your password input fields more user-friendly. In this tutorial, we'll walk through the steps of creating a show/hide password toggle that you can use in your own web projects. Preview: Step 1: HTML Markup First, let's create the HTML markup for the password input field and the eye icon that will serve as our toggle button. Here's the code for the form:      < center >        <form   style = "width: 350px; margin: auto" >          <h2> CodeLSC </h2>          <div   class = "input-icons" >            <i   class = "fa fa-user icon" >   </i>            &l