📁 PHP Dosya Yöneticisi
/
/
home
/
demodesigncom
/
firmarehberiv1.demodesign.com.tr
/
js
📝
selectchained.js
← Geri Dön
(function($) { $.fn.remoteChained = function(parent_selector, url, options) { return this.each(function() { /* Save this to self because this changes when scope changes. */ var self = this; var backup = $(self).clone(); /* Handles maximum two parents now. */ $(parent_selector).each(function() { $(this).bind("change", function() { var id = $(this).attr("id"); if(id=='il'){ $("#ilce").attr("disabled", true); } /* Build data array from parents values. */ var data = {}; $(parent_selector).each(function() { var id = $(this).attr("id"); var value = $(":selected", this).val(); data[id] = value; }); $.getJSON(url, data, function(json) { /* enable the select */ if(id=='il'){ $("#ilce").attr("disabled", false); } /* Clear the select. */ $("option", self).remove(); /* Add new options from json. */ for (var key in json) { if (!json.hasOwnProperty(key)) { continue; } /* This sets the default selected. */ if ("selected" == key) { continue; } var option = $("<option />").val(key).append(json[key]); $(self).append(option); } /* Loop option again to set selected. IE needed this... */ $(self).children().each(function() { if ($(this).val() == json["selected"]) { $(this).attr("selected", "selected"); } }); /* If we have only the default value disable select. if (1 == $("option", self).size() && $(self).val() === "") { $(self).attr("disabled", "disabled"); } else { $(self).removeAttr("disabled"); }*/ /* Force updating the children. */ $(self).trigger("change"); }); }); /* Force updating the children. */ $(this).trigger("change"); }); }); }; /* Alias for those who like to use more English like syntax. */ $.fn.remoteChainedTo = $.fn.remoteChained; })(jQuery);
💾 Kaydet
İptal
📝 Yeniden Adlandır
İptal
Kaydet
🔐 Dosya İzinleri (chmod)
İzin Değeri:
Hızlı Seçim:
777
755
644
600
777
= Herkes okur/yazar/çalıştırır
755
= Sahip tam, diğerleri okur/çalıştırır
644
= Sahip okur/yazar, diğerleri okur
600
= Sadece sahip okur/yazar
İptal
Uygula