﻿
{"id":1807,"date":"2013-07-04T15:30:46","date_gmt":"2013-07-04T15:30:46","guid":{"rendered":"http:\/\/www.gencayyildiz.com\/blog\/?p=1807"},"modified":"2013-08-26T22:09:10","modified_gmt":"2013-08-26T22:09:10","slug":"javascript-ile-dropdownlist-icini-bosaltmak","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/javascript-ile-dropdownlist-icini-bosaltmak\/","title":{"rendered":"JavaScript \u0130le DropDownList \u0130\u00e7ini Bo\u015faltmak"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p><a href=\"http:\/\/www.gencayyildiz.com\/blog\/asp-net-mvcde-jquery-ile-ic-ice-bagimli-dropdownlistcascading-dropdownlist\/\" target=\"_blank\">Asp.NET MVC&#8217;de JQuery \u0130le \u0130\u00e7 \u0130\u00e7e Ba\u011f\u0131ml\u0131 DropDownList(Cascading DropDownList)<\/a> ba\u015fl\u0131kl\u0131 yaz\u0131mda iki DropDownList aras\u0131nda ba\u011flant\u0131 olu\u015fturmu\u015ftuk.Ana DropDownList&#8217;ten se\u00e7ilen bir veriye ba\u011fl\u0131 de\u011ferler ikinci DropDownList nesnemizde listeleniyordu.Lakin bu yaz\u0131mda g\u00f6rd\u00fc\u011f\u00fcm en b\u00fcy\u00fck eksiklik ana DropDownList&#8217;ten de\u011fer se\u00e7ildi\u011fi zaman ikinci DropDownList doluyor, farkl\u0131 bir de\u011fer se\u00e7ildi\u011fi zaman ikinci DropDownList nesnemizde \u00f6nceki veriye kar\u015f\u0131l\u0131k gelen de\u011ferlerle yeni de\u011ferler listeleniyordu.Yani ikinci DropDownList nesnemizin i\u00e7indeki veriler silinmiyordu.<\/p>\n<p>Bu i\u015flemde s\u0131k\u0131nt\u0131 ya\u015fayan okurlar\u0131m i\u00e7in a\u015fa\u011f\u0131daki JavaScript kodunu payla\u015f\u0131yorum.Bu kod sayesinde bir DropDownList nesnesinin i\u00e7ini bo\u015faltmay\u0131 sa\u011flayabilirsiniz.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n        var x = document.getElementById(&quot;DropDownListAdi&quot;);\r\n        for (var i = 0; i &lt; x.length ; i++) {\r\n            x.remove(i);\r\n        }\r\n<\/pre>\n<p>Bu kodu istedi\u011finiz olayda \u00e7al\u0131\u015ft\u0131rabilirsiniz.Faydalanman\u0131z dile\u011fiyle..<br \/>\n\u0130yi \u00e7al\u0131\u015fmalar..<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>Asp.NET MVC&#8217;de JQuery \u0130le \u0130\u00e7 \u0130\u00e7e Ba\u011f\u0131ml\u0131 DropDownList(Cascading DropDownList) ba\u015fl\u0131kl\u0131 yaz\u0131mda iki DropDownList aras\u0131nda ba\u011flant\u0131 olu\u015fturmu\u015ftuk.Ana DropDownList&#8217;ten se\u00e7ilen bir veriye ba\u011fl\u0131 de\u011ferler ikinci DropDownList nesnemizde listeleniyordu.Lakin bu yaz\u0131mda g\u00f6rd\u00fc\u011f\u00fcm en b\u00fcy\u00fck eksiklik ana DropDownList&#8217;ten&#46;&#46;&#46;<!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,19],"tags":[443,265,748,451],"class_list":["post-1807","post","type-post","status-publish","format-standard","hentry","category-javascript","category-jquery","tag-dropdownlist","tag-javascript-2","tag-jquery","tag-remove"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/1807","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/comments?post=1807"}],"version-history":[{"count":0,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/1807\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=1807"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=1807"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=1807"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}