Javascript

Creating a table with items selected from a dropdown list

In this article we'll create a dropdown list, add each item selected into an array and display the contents of that array in a table using jQuery. We'll also be able to delete items from the array and table.

For anyone who has no idea what jQuery is, below is a brief explanation:

jQuery is a JavaScript Library that focuses on simplifying DOM manipulation, AJAX calls, and Event handling. It is used by JavaScript developers frequently.

Basic input manipulation and validation with jQuery

In this article we'll create a text input field and set a couple of rules.

The first rule is that the first character must be 0 and If it's not, we'll change whatever the character is to 0.

The second rule is that the number must be 10 digits long and we'll display a count as the user types.

What we won't cover in this article is ensuring that the user only types in numbers.

Create, Edit and Delete with jQuery

In this article we'll go through creating items and adding them to an array, editing any of those items and deleting an item. For anyone who has no idea what jQuery is, below is a brief explanation:

jQuery is a JavaScript Library that focuses on simplifying DOM manipulation, AJAX calls, and Event handling. It is used by JavaScript developers frequently.

jQuery uses a format, $(selector).action() to assign an element(s) to an event. To explain it in detail, $(selector) will call jQuery to select selector element(s), and assign it to an event API called .action().

How to make an Ajax request with Javascript

AJAX stands for Asynchronous JavaScript And XML. In a nutshell, it is the use of the XMLHttpRequest object to communicate with servers.

It can send and receive information in various formats, including JSON, XML, HTML, and text files.AJAX’s most appealing characteristic is its "asynchronous" nature, which means it can communicate with the server, exchange data, and update the page without having to refresh the page.

Javascript - Adding, Selecting and Removing elements on a page.

In this article we look at adding items to a list, selecting an item and removing an item from the list using JavaScript.

The code below is pure Javascript without any jQuery. Please use the demo on the right hand side to see what you can achieve with the code below.

If you'd like a jQuery version of the code please leave a comment, also feel free to ask any questions.

Tags