Found 10483 Articles for Web Development

How to display the tag name of the clicked element using jQuery?

Dishebh Bhayana
Updated on 03-Aug-2023 19:22:24

431 Views

In this article, we will learn how to display the tag name of the clicked element using jQuery, and with the help of click event listeners. jQuery is a popular JavaScript library that makes it easy to manipulate HTML elements on a web page or listen to user actions like click events and do some operation based on that action.. Let’s understand how we can achieve the above with the help of some examples. Example 1 In this example, we will add a heading, some text, and a list of items to the HTML document. And to display the ... Read More

How to Display Spinner on the Screen till the data from the API loads using Angular 8?

Dishebh Bhayana
Updated on 03-Aug-2023 19:17:55

831 Views

In this article, we will learn how to display a spinner on the screen till the data gets loaded from an API, using Angular 8 and the HTTPClient service to fetch data from a dummy todos API. Angular 8 is a robust framework for building web applications. It offers many features that make creating dynamic and interactive user interfaces easy. Let’s use the framework and understand how to show a spinner component conditionally using an example. Prerequisites Before proceeding with the steps below, please ensure you have angular CLI installed on your systems, as we would be relying ... Read More

How to display a popup message when a logged-out user tries to vote?

Dishebh Bhayana
Updated on 03-Aug-2023 19:09:26

167 Views

In this article, we will learn how to display a popup message when a logged-out user tried to vote using jQuery and its various methods. In many web applications, it is important to restrict certain actions to logged-in users only, for example, voting on a poll or a form. To implement this functionality, we will use the jQuery library and some basic HTML and CSS. We will show a popup message that informs the user that they need to be logged in to perform the desired action. Let’s understand the above approach with the help of an example − ... Read More

How to display logged-in user information in PHP?

Dishebh Bhayana
Updated on 03-Aug-2023 18:59:08

2K+ Views

In this article, we will learn how to display logged-in user information using PHP and its various inbuild methods. When building a web application that requires authentication, it is often necessary to display the logged-in user's information on various pages. This could be useful in applications such as e-commerce websites, banking websites, and more. We can implement this with the help of PHP and its functions. Let’s understand this with the help of some examples. Example 1 In this example, we will create a login/logout system wherein the user will get authenticated once he is logged in, and will ... Read More

How to display errors without an alert box using JavaScript?

Dishebh Bhayana
Updated on 02-Aug-2023 20:16:29

1K+ Views

In this article, we will learn how to display errors inline on a page and without an alert box using javascript with the help of innerHTML and textContent properties of HTML DOM elements. While alert boxes can be useful for displaying errors to users, they can be disruptive and interrupt the user experience. A more elegant solution is to display errors inline on the page. Let’s understand how to achieve the above result with the help of 2 approaches Approach 1 In this approach, we will use the innerHTML DOM element property to display the error message inline in ... Read More

How to display child row information using jQuery DataTables plugin?

Dishebh Bhayana
Updated on 02-Aug-2023 19:47:33

760 Views

In this article, we will learn how to display child row information using jQuery DataTables plugin. We will also provide some HTML code examples to illustrate the usage of this feature. jQuery DataTables is a powerful plugin that provides an easy way to display tabular data on a web page. It has a lot of features such as pagination, sorting, searching, etc. It also provides us with the DataTables plugin, which gives us the ability to display child row information, and consequently shows additional data related to each row. Now, let’s understand the feature with the help of some examples. ... Read More

How to display a black navigation bar in Bootstrap?

Dishebh Bhayana
Updated on 02-Aug-2023 19:39:36

213 Views

In this article, we will learn how to display a black navigation bar in Bootstrap with the help of various Bootstrap classes, like “navbar-dark”, or “bg-dark”. Navigation bars are useful in a website as they provide easier navigation to the main contents on the platform, better accessibility throughout the website, and an overall enhanced user experience. Here, we will create a black-colored navigation bar using Bootstrap and its classes. We will be using the Bootstrap CDN in our examples below to import Bootstrap into our project. Let’s understand this with the help of some examples − Example 1 In this ... Read More

How to display a list in n columns format?

Dishebh Bhayana
Updated on 02-Aug-2023 19:35:18

1K+ Views

In this article, we will learn how to display a list in “n” column format in HTML and CSS with the help of columns, column-count, and grid CSS properties. Displaying a list in columns can be a useful way to save space and make the information more visually appealing. We can achieve this by using different approaches that rely on columns, column-count, and grid properties respectively. Let’s understand each approach in detail. Approach 1 In this approach, we will use the column-count CSS property to determine the number of columns we will divide our content into. Let’s understand ... Read More

How to display a dialog box on the page?

Dishebh Bhayana
Updated on 02-Aug-2023 19:32:15

2K+ Views

In this article, we will learn how to display a dialog box on the page using the dialog HTML tag. Dialog boxes can be a useful tool to provide feedback to users or to prompt them for input. The HTML element provides an easy way to display a dialog box on a web page. The element is not supported in all browsers, but it can be polyfilled using JavaScript to provide support for older browsers. Let’s understand how to implement a dialog box on a webpage with the help of some examples Example 1 In this example, we ... Read More

How to disable mouseout events triggered by child elements?

Dishebh Bhayana
Updated on 02-Aug-2023 19:29:14

1K+ Views

In this article, we will learn how to disable the mouseout events triggered by child elements with the help of the “mouseleave” event or using the stopPropagation method of the native HTML event. The “mouseout” event, when triggered on a child element, bubbles up in its DOM hierarchy, and so it will also trigger the same event on all its parent elements. This can be unneeded when we only want to listen to the “mouseout” event on the parent element itself, not the bubbled-up event from its child elements. Let’s understand how to avoid the above problem with the ... Read More

Advertisements