Found 10711 Articles for Web Development

How to display logged-in user information in PHP?

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

1K+ 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

937 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

499 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

119 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

645 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

861 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

620 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

How to disable the input type text area?

Dishebh Bhayana
Updated on 02-Aug-2023 19:25:37

508 Views

In this article, we will learn how to disable the input type text area element with the help of a disabled attribute. Disabling an input field can be useful in situations where one wants to display information to the user but does not want the user to be able to edit or modify that information. For example, to display a message or a set of instructions in a text area element. This can also be useful in cases where one wants the user to avoid typing the content in the text area in the middle of a form submission. This ... Read More

How to disable the form submit on enter button using jQuery?

Dishebh Bhayana
Updated on 02-Aug-2023 19:21:17

929 Views

In this article, we will learn how to disable the form submit behavior with the press of enter button using jQuery, and its element selector feature and “keypress” event listener. Form submission disabling can be useful in cases where it requires some validation on some input fields. For example, a form with the name and email required should not ideally have the submit button enabled until those required fields are provided with some values. In these types of cases, we can disable the form submission dynamically to achieve the desired outcome. Here, we will disable the form submission flow specifically ... Read More

How to disable buttons using AngularJS?

Dishebh Bhayana
Updated on 02-Aug-2023 19:17:21

1K+ Views

In this article, we will learn how to disable button HTML elements using angularJS with the help of the “ng-disabled” angularJS directive. Disabled buttons can be useful in cases of forms that have some validation required on some input fields. For example, a form with the name and email required should not ideally have the submit button enabled until those required fields are provided with some values. In these types of cases, we can disable and enable the button dynamically to achieve the desired outcome. Here, we will use the “ng-disabled” angular directive to disable a button. The directive accepts ... Read More

Advertisements