Limit Number Of Checkbox Selections Using JavaScript

Table of Contents Introduction Prerequisites Limit Checkbox Selection Using JavaScript Using Form HTML JavaScript Using Div HTML JavaScript Testing Checkbox Selection Limit Using Form Using Div Source Code Introduction This tutorial shows how to limit number of checkbox selections using JavaScript in a group of checkboxes. Suppose you have a group of checkboxes in a form or in a div…

AJAX Technique Example Using JavaScript

AJAX – Asynchronous JavaScript And XML This tutorial shows an example on AJAX using JavaScript. AJAX is an acronym that stands for Asynchronous JavaScript And XML. Therefore it is not a technology, but a technique which is implemented using JavaScript. Here I will show you how to use AJAX technique in simple way without using jquery or any other framework….

JavaScript function which takes multiple ids and returns multiple elements

Introduction This tutorial shows how to implement a JavaScript function which takes multiple ids and returns multiple elements. document.getElementById() only supports one name at a time and returns a single node but not multiple nodes or an array of nodes.

Find Full Path For Nested Categories In MySQL

Path For Nested Categories This tutorial shows how to find the entire or full path from root to child for nested categories and subcategories. Let’s say you have a table in database server in such a way that it contains an unlimited level of categories and you have another column in the same table which should contain the entire path…

Generate Zero-Fill Auto-Incremented Id In MySQL

Zero-Fill Auto-Incremented Id This tutorial shows how to generate zero-fill auto-incremented unique identifier in MySQL. Sometimes you may need to generate such keys which are used in some part of the application for business logic. Below example shows how to generate zero-fill auto-incremented id in MySQL table.

Select only one random item from each category in MySQL

This tutorial shows how to select items randomly from each category in MySQL. So here I will select exactly one item randomly from each category. People who need sometimes to select photo from each photo category and display them on the page for animation purpose will be benefited. In this example I have used two sample tables with data. You…

Custom regex function to replace characters in MySQL

This tutorial shows how to replace the characters in a string or text using regular expression in MySQL function. There is no built-in function available to replace any character in a string or text in MySQL so here I am creating a custom function.

Instantiate Object From A Class Which Contains Private constructor

Private Constructor You probably know that you cannot make any object if the Class contains private constructor but this is not true until a special care is taken to the private constructor. This tutorial shows an example how to create instance using Reflection even if the classes have private constructors. Though if the special care is taken to the private…

How to read input through keyboard in Java

This tutorial shows how to read input from keyword using Java programming language. For example if your database connection string changes then you don’t need to worry because for any database connection string like username and password, this will still work. This is a simple example, you can customize as per your need. You can also apply validation on each…

Verify A String Contains Only Numeric Value Using Java

Introduction The below example shows how to verify that a string contains only numeric value in Java. String may contain float value, double value etc. This example uses regular expression to check a string contains only numeric values. It makes sure that your string should contain only digits and dot(.). You may need sometimes to use string variable for storing…