Dependent Dropdown Example

This tutorial will show you how to create dependent or cascaded dynamic dropdown using jQuery. Sometimes you need to create such a cascaded dropdown where you need to select some value in the second dropdown based on first dropdown value. For example, you may need to select city dropdown value based on country dropdown value and for this you cannot pre-populate the city dropdown value unless you know the country value from country dropdown. I will explain here with an example using jQuery. The example here contains two dropdown –…

Continue

Auto populate input field using JavaScript

This tutorial example shows how to populate HTML input fields in form automatically when a page is loaded or when a checkbox is checked. The below example has three fields and one of then gets populated when the page is loaded and another one of them is populated when checkbox is checked. Sometimes you may need to auto populate the input fields depending upon another field then it may be useful. So below example will give you an idea so that you can also populate your form fields according to…

Continue

Submit form JavaScript onChange

This tutorial example shows how to submit form automatically when a radio button is selected. The below example has two radio buttons and when one of them is selected then the form gets submitted and displays the corresponding value. Sometimes we need to submit the form automatically and then we need to do some funther processing. We can submit form automatically on onClick, onChange javascript events which can be applied on many tags like <select/>, input type radio, input type checkbox etc.

Continue

Dependent dropdown example in PHP, MySQL

Introduction This tutorial shows how to create dependent dropdown in PHP and MYSQL. This is also called cascaded dropdown. This tutorial uses JavaScript to submit the form automatically when the first dropdown value is selected. Sometimes we need to create such a cascaded dropdown when we need to select some value in the second dropdown based on first dropdown value or third dropdown value based on second dropdown value.

Continue