how to change second drop down list on change of first drop down list option

HTML <select name=”select11″ id=”select11″> <option value=”1″>Fruits</option> <option value=”2″>Animals</option> <option value=”3″>Birds</option> <option value=”4″>Cars</option> </select> <select name=”select12″ id=”select12″> <option value=”1″>Litchi</option> <option value=”1″>Mango</option> <option value=”1″>Orange</option> <option value=”2″>Lion</option> <option value=”2″>Fox</option> <option value=”2″>Bear</option> <option value=”3″>Parrot</option> <option value=”3″>Hawk</option> <option value=”4″>Maruti</option> </select> JAVASCRIPT $(“#select11”).change(function() { if($(this).data(‘options’) == undefined){ /*Taking an array of all options-2 and kind of embedding it on the select1*/ … Read more

how to calculate value of two textfield and display its sum in third textfield autmotatically

hi,friends i want to show the trick of how to calculate the value of two text-field and got its sum in third text-field automatically and show sum when we type some value in second text-field. JAVASCRIPT <script> function sum() { var txtFirstNumberValue = document.getElementById(‘txt1’).value; var txtSecondNumberValue = document.getElementById(‘txt2’).value; var result = parseInt(txtFirstNumberValue) + parseInt(txtSecondNumberValue); if (!isNaN(result)) … Read more

Select All Checkboxes Using JavaScript

Select All Checkboxes Using JavaScript

When you have a list of checkboxes and select all option in a form then you must have to implement check uncheck all checkbox on click of select allcheckbox. In this tutorial, we are going to see how to select all Checkboxes using JavaScript. Here I am going to create a simple JavaScript function to … Read more