{"id":177,"date":"2009-05-04T15:59:00","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.yazilimmutfagi.com\/?p=177"},"modified":"2009-05-04T15:59:00","modified_gmt":"1970-01-01T00:00:00","slug":"web-sayfalarinda-f5-butonunu-nasil-iptal-ederiz","status":"publish","type":"post","link":"https:\/\/www.yazilimmutfagi.com\/index.php\/2009\/05\/04\/web-sayfalarinda-f5-butonunu-nasil-iptal-ederiz\/","title":{"rendered":"Web Sayfalarinda F5 Butonunu Nasil Iptal Ederiz."},"content":{"rendered":"<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><strong style=\"\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Web Sayfalarinda F5 Butonunu Nasil Iptal Ederiz<\/span><\/strong><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">ASP.net veya herhangi bir web dili ile yazdiginiz sayfa i&ccedil;inde kullanicilarin F5 tusunu basmalarini istemiyorsaniz, biraz javascript kullanarak bu islemi yapabilirsiniz. <\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Isin mantigini basit&ccedil;e anlatayim. Javascript ile basilan tuslari yakaliyoruz. Eger basilan tus F5 tusu ise sayfanin postback islemini engelliyoruz. Hepsi bu, bu sekilde istediginiz tuslari engelleyebilir veya herhangi bir tusa basildigi zaman web sayfaniza bir islem yaptirabilirsiniz. Windows uygulamalarindaki fonksiyon butonlarini nasil &ouml;zel islemler i&ccedil;in ayarlayabiliyorsak web uygulamalariniz i&ccedil;inde ayni islemleri yapabiliriz.<\/span><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">F5 butonunu iptal etmek i&ccedil;in tek yapmaniz gereken <a href=\"http:\/\/www.yazilimmutfagi.com\/Makale\/Img\/Sabri\/Javascript\/F5Iptal.js\"><span style=\"color: rgb(0, 0, 255);\">bu javascript dosyasini<\/span><\/a> projenize eklemek ve sayfanizin head taglari arasina asagidaki kodu eklemek. Hepsi bu.<span style=\"color: black;\"> <span style=\"\">&nbsp;<\/span>F5 butonu i&ccedil;in keycode 116 dir. Diger butonlar i&ccedil;inde keycodelarini kullanarak istediginiz butona istediginiz islevselligi vermek asagidaki y&ouml;ntemle &ccedil;ok kolaydir.<\/span><\/span><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" width=\"595\" style=\"margin: auto auto auto 5.4pt; background: rgb(238, 236, 225) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 446.55pt; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"595\" style=\"border: 1pt solid black; padding: 0cm 5.4pt; width: 446.55pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt 1.7pt; text-indent: -1.7pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">&lt;<\/span><span style=\"font-size: 10pt; color: rgb(163, 21, 21); font-family: &quot;Courier New&quot;;\">script<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: red;\">type<\/span><span style=\"color: blue;\">=&quot;text\/javascript&quot;<\/span> <span style=\"color: red;\">src<\/span><span style=\"color: blue;\">=&quot;F5Iptal.js&quot;&gt;&lt;\/<\/span><span style=\"color: rgb(163, 21, 21);\">script<\/span><span style=\"color: blue;\">&gt;<\/span><\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><span style=\"font-size: small; font-family: Calibri;\">&nbsp;<\/span><a href='www.yazilimmutfagi.com'>.<\/a><\/p>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><strong style=\"\"><span style=\"font-size: 10pt; line-height: 115%; font-family: &quot;Verdana&quot;,&quot;sans-serif&quot;;\">Javascript dosyanin i&ccedil;erigi:<\/span><\/strong><\/p>\n<table cellspacing=\"0\" cellpadding=\"0\" border=\"1\" width=\"595\" style=\"margin: auto auto auto 5.4pt; background: rgb(238, 236, 225) none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: 446.55pt; border-collapse: collapse;\" class=\"MsoTableGrid\">\n    <tbody>\n        <tr style=\"\">\n            <td valign=\"top\" width=\"595\" style=\"border: 1pt solid black; padding: 0cm 5.4pt; width: 446.55pt; background-color: transparent;\">\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">if<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> (document.addEventListener) document.addEventListener(<span style=\"color: rgb(163, 21, 21);\">&#8216;keypress&#8217;<\/span>, F5IptalEt, <span style=\"color: blue;\">true<\/span>);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">else<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> <span style=\"color: blue;\">if<\/span> (document.attachEvent) document.attachEvent(<span style=\"color: rgb(163, 21, 21);\">&#8216;onkeydown&#8217;<\/span>, F5IptalEt);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">else<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> document.onkeydown = F5IptalEt;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; color: blue; font-family: &quot;Courier New&quot;;\">function<\/span><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"> F5IptalEt(event) {<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">if<\/span> (!event) event = window.event;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">if<\/span> (!event) <span style=\"color: blue;\">return<\/span>;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">var<\/span> keyCode = event.keyCode ? event.keyCode : event.charCode;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp; <\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green;\">\/\/116 F5 tusu<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">if<\/span> (keyCode == 116) {<span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green;\">\/\/ Standart DOM (Mozilla):<\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">if<\/span> (event.preventDefault) event.preventDefault();<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">&nbsp;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: green;\">\/\/IE <\/span><\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">if<\/span> (document.all &amp;&amp; window.event &amp;&amp; !event.preventDefault) {<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>event.cancelBubble = <span style=\"color: blue;\">true<\/span>;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>event.returnValue = <span style=\"color: blue;\">false<\/span>;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbspnbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>event.keyCode = 0;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>}<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span>alert(<span style=\"color: rgb(163, 21, 21);\">&#8216;F5 Tusu Malesef Yasak Kardesim&#8217;<\/span>);<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/span><span style=\"color: blue;\">return<\/span> <span style=\"color: blue;\">false<\/span>;<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\"><span style=\"\">&nbsp;&nbsp;&nbsp; <\/span>}<\/span><\/p>\n            <p style=\"margin: 0cm 0cm 0pt 1.7pt; text-indent: -1.7pt; line-height: normal;\" class=\"MsoNormal\"><span style=\"font-size: 10pt; font-family: &quot;Courier New&quot;;\">}<\/span><\/p>\n            <\/td>\n        <\/tr>\n    <\/tbody>\n<\/table>\n<p style=\"margin: 0cm 0cm 10pt;\" class=\"MsoNormal\"><strong style=\"\"><span style=\"font-size: small; font-family: Calibri;\">&nbsp;<\/span><\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>Web sayfanizda F5 butonuna basildiginda sayfanizin refresh olmamasini nasil saglariz. F5 butonun yakaladigimiz gibi diger fonksiyon butonlarinida yakalayarak her butona farkli bir islevsellik nasil verebiliriz.<\/p>\n","protected":false},"author":517,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[408],"tags":[5111,4414,5159,6080,6060,4360,5698,5727],"_links":{"self":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/177"}],"collection":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/users\/517"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/comments?post=177"}],"version-history":[{"count":0,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/posts\/177\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/media?parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/categories?post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yazilimmutfagi.com\/index.php\/wp-json\/wp\/v2\/tags?post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}