Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getChildren(parent, list, base) {
- var url = base + '/ajax/getChildren.php?parent=' + parent;
- loadOptions(list, url);
- $(document).ready(function() {
- var idgenus = $('#r_genus').children(":selected").val();
- var idspecies = $('#r_species').children(":selected").val();
- if (idgenus != 0) {
- alert(idgenus);
- $.ajax({
- type: "GET",
- url: base + '/ajax/getData.php?id=' + idgenus,
- success: function(data){
- $('.genusbox').html(data);
- $('.genusbox').fadeIn("slow");
- } //end sucess
- }); // end ajax call
- } else {
- $.ajax({
- type: "GET",
- url: base + '/ajax/getData.php?id=' + id,
- success: function(data){
- alert(idspecies);
- $('.speciessbox').html(data);
- $('.speciesbox').fadeIn("slow");
- } //end sucess
- }); // end ajax call
- }
- return false;
- }); //doc ready
- }
Add Comment
Please, Sign In to add comment