﻿
{"id":2604,"date":"2014-04-12T09:33:51","date_gmt":"2014-04-12T09:33:51","guid":{"rendered":"http:\/\/www.gencayyildiz.com\/blog\/?p=2604"},"modified":"2014-04-12T09:33:51","modified_gmt":"2014-04-12T09:33:51","slug":"jquery-load-dosya-yukleme-fonksiyonu","status":"publish","type":"post","link":"https:\/\/www.gencayyildiz.com\/blog\/jquery-load-dosya-yukleme-fonksiyonu\/","title":{"rendered":"JQuery &#8211; Load Dosya Y\u00fckleme Fonksiyonu"},"content":{"rendered":"<div id=\"fb-root\"><\/div>\n<p>Bir web projesinde harici dosyay\u0131 a\u00e7\u0131p i\u00e7eri\u011fini g\u00f6sterebilmek i\u00e7in JQuery k\u00fct\u00fcphanesinden &#8220;load&#8221; fonksiyonunu kullanabiliriz.\u0130\u00e7eri\u011fi g\u00f6sterilen dosya fiziksel olarak server taraf\u0131nda bulunmas\u0131 gerekiyor ya da fiziksel dosya yolunu tam olarak belirtebildi\u011finiz dosyalarda hi\u00e7 bir problem ya\u015fanmadan dosya y\u00fcklenip i\u00e7eri\u011fi a\u00e7\u0131labiliyor.\u015eimdi gelin JQuery &#8211; load fonksiyonunu beraber inceleyelim.<br \/>\n<!--more--><br \/>\n\u00d6ncelikle load fonksiyonunun \u00f6zelliklerini g\u00f6relim.<\/p>\n<ol>\n<li>load fonksiyonu ile &#8220;html&#8221;, &#8220;js&#8221;, &#8220;txt&#8221;, &#8220;css&#8221; vs.. gibi uzant\u0131l\u0131 dosyalar\u0131n i\u00e7eriklerine eri\u015filebilmektedir.<\/li>\n<li>load fonksiyonu se\u00e7ilen dosyay\u0131 mant\u0131ksal olarak y\u00fckler, i\u00e7eri\u011fini a\u00e7abiliyorsa gerekli belirtilen alanda g\u00f6sterir.Fiziksel hi\u00e7 bir i\u015flem ger\u00e7ekle\u015ftirmez.<\/li>\n<li>load fonksiyonu se\u00e7ilen dosyan\u0131n i\u00e7eri\u011fi uygunsa e\u011fer &#8220;html&#8221;, &#8220;css&#8221; ve &#8220;js&#8221; komutlar\u0131n\u0131 \u00e7al\u0131\u015ft\u0131r\u0131r.(<span style=\"font-size: x-small;\">Komutlar do\u011fru prosed\u00fcrlere sahiplerse e\u011fer taray\u0131c\u0131 taraf\u0131ndan derlenmekte ve \u00e7al\u0131\u015ft\u0131r\u0131lmaktad\u0131r.<\/span>)<\/li>\n<\/ol>\n<p>\u015eimdi bir \u00f6rneklendirme yapal\u0131m.<br \/>\nA\u015fa\u011f\u0131daki kod blo\u011funu inceleyeniz.<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;script type=&quot;text\/javascript&quot; src=&quot;js\/jquery-2.0.2.min.js&quot;&gt;&lt;\/script&gt;\r\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html; charset=utf-8&quot; \/&gt;\r\n&lt;script type=&quot;application\/javascript&quot;&gt;\r\nfunction DosyaGoruntule()\r\n{\r\n\t$(&quot;#Goruntuleyici&quot;).load(&quot;harici.html&quot;);\r\n\t}\r\n&lt;\/script&gt;\r\n&lt;style&gt;\r\n.GoruntuleyiciClass{\r\n\twidth: 200px;\r\n\theight: 200px;\r\n\tborder: 2px ridge #999;\r\n\t}\r\n&lt;\/style&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;div name=&quot;Goruntuleyici&quot; id=&quot;Goruntuleyici&quot; class=&quot;GoruntuleyiciClass&quot;&gt;&lt;\/div&gt;\r\n&lt;input type=&quot;submit&quot; id=&quot;tikla&quot; name=&quot;tikla&quot; value=&quot;Dosya \u0130\u00e7eri\u011fi G\u00f6r\u00fcnt\u00fcle&quot; onClick=&quot;DosyaGoruntule();&quot; \/&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Yukar\u0131daki kod blo\u011funu incelerseniz e\u011fer &#8220;Goruntuleyici&#8221; isimli div nesnesinde harici dosyam\u0131z\u0131n i\u00e7eri\u011fini  g\u00f6r\u00fcnt\u00fcl\u00fcyoruz.Dikkat ederseniz &#8220;harici.html&#8221; isimli bir dosyay\u0131 html dosyas\u0131n\u0131n i\u00e7eri\u011fini g\u00f6stertiyoruz.<\/p>\n<p>Yukar\u0131daki \u00f6rnek kodun ekran g\u00f6r\u00fcnt\u00fcs\u00fc a\u015fa\u011f\u0131daki gibidir.<br \/>\n<a href=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2014\/04\/jquery-load.png\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2014\/04\/jquery-load-300x156.png\" alt=\"jquery-load\" width=\"300\" height=\"156\" class=\"aligncenter size-medium wp-image-2607\" srcset=\"https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2014\/04\/jquery-load-300x156.png 300w, https:\/\/www.gencayyildiz.com\/blog\/wp-content\/uploads\/2014\/04\/jquery-load.png 450w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/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>Bir web projesinde harici dosyay\u0131 a\u00e7\u0131p i\u00e7eri\u011fini g\u00f6sterebilmek i\u00e7in JQuery k\u00fct\u00fcphanesinden &#8220;load&#8221; fonksiyonunu kullanabiliriz.\u0130\u00e7eri\u011fi g\u00f6sterilen dosya fiziksel olarak server taraf\u0131nda bulunmas\u0131 gerekiyor ya da fiziksel dosya yolunu tam olarak belirtebildi\u011finiz dosyalarda hi\u00e7 bir problem&#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":[19],"tags":[748,584],"class_list":["post-2604","post","type-post","status-publish","format-standard","hentry","category-jquery","tag-jquery","tag-load"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/2604","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=2604"}],"version-history":[{"count":0,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/posts\/2604\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/media?parent=2604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/categories?post=2604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gencayyildiz.com\/blog\/wp-json\/wp\/v2\/tags?post=2604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}