Created
May 12, 2015 10:50
-
-
Save kaoskeya/7e85d468b3260f4b6040 to your computer and use it in GitHub Desktop.
Scrap 3 dependant dropdowns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a = []; | |
$("#cboDivision option").each(function(indd, d){ if( $(d).val() != 0 ) { | |
$("#cboDivision").attr('selectedIndex', indd).trigger("change"); | |
$("#cboSubDivision option").each(function(inds, sd){ if( $(sd).val() != 0 ) { | |
$("#cboSubDivision").attr('selectedIndex', inds).trigger("change");; | |
$("#cboPoliceStation option").each(function(indp, e){ if( $(e).val() != 0 ) a.push({ "division": $("#cboDivision").val().trim(), "subdivision": $("#cboSubDivision").val().trim(), "policestation": $(e).text().trim() }) } ); | |
}}); | |
}}); | |
copy(a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment