Author: Soumitra Roy Sarkar

Add input fields to form dynamically using jQuery

This tutorial shows an example how to add input types text, textarea and file to the form. For this example I have used here jquery for dynamically adding inputs, css for some basic style and html code. We have select/option for what type of input to be added to the form. We have one <span/> […]

Limit number of checkbox selections using javascript

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 or table cell or wherever else and you have a requirement that a user can select maximum of two or three or n […]

JavaScript function which takes multiple ids and returns multiple elements

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 only returns a single node not an array of nodes. You have several different options: You could implement your own function that takes multiple ids and returns multiple elements. […]

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 we 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.

Scroll to top