Kategori: JavaScript

ajax post

$.ajax({ url: “http://www.yk.com/Insert”, type: “POST”, dataType: “json”, contentType: ‘application/json; charset=utf-8’, data: JSON.stringify({ Code: 123, Data: “data”, Comment: “” }), success: function (data) { } });  

Jquery Favico Plugin – favico.js

.Bu plugin sayesinde favico olarak resim,video,webcam koyabiliyoruz.Ayrıca favico üzerine sayısal olarak bildirim sayısı da yazdıra biliyoruz ve dinamik olarak değiştire biliyoruz.Tüm ayarları için http://lab.ejci.net/favico.js/ buraya bakabilirsiniz.

Online Pdf, Excel v.s. Download

<html> <head> <meta http-equiv=”content-type” content=”text/html; charset=UTF-8″> <meta name=”robots” content=”noindex, nofollow”> <meta name=”googlebot” content=”noindex, nofollow”> <script type=”text/javascript” src=”http://code.jquery.com/jquery-2.1.3.js”></script> <link rel=”stylesheet” type=”text/css” href=”/css/result-light.css”> <script type=”text/javascript” src=”http://www.cloudformatter.com/Resources/Pages/CSS2Pdf/Script/xepOnline.jqPlugin.js”></script> <style type=”text/css”></style> <title>@cloudformatter template</title> </head> <body> <div id=”buttons”> <button onclick=”return...

FileSaver.js

FileSaver.js

<script src="FileSaver.js"></script> var blob = new Blob([“Hello, world!”], {type: "text/plain;charset=utf-8"}); saveAs(blob, "hello world.txt"); Detaylı bilgi ve örneklere https://github.com/eligrey/FileSaver.js sayfasından ulaşabilirsiniz.

Javascript base64encode(input)

Javascript base64encode(input)

function base64encode(input) { var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = utf8Encode(input); while (i < input.length) { chr1 = input.charCodeAt(i++);...

html2canvas

Ekrandaki verilerin “screenshots” almak için kullanılır. http://html2canvas.hertzen.com/

Export HTML Table to CSV TXT JSON XML SQL XLS DOC PNG PDF

Installation To save the generated export files on client side, include: <script type=”text/javascript” src=”libs/FileSaver/FileSaver.min.js”></script> To export the table as a PDF file the following includes are required: <script type=”text/javascript” src=”libs/jsPDF/jspdf.min.js”></script> <script type=”text/javascript” src=”libs/jsPDF-AutoTable/jspdf.plugin.autotable.js”></script> To...

Sayfa Yükleniyor…..

<div id=”divLoading” style=”display:none; z-index: 10002;”> <div class=”jtable-busy-panel-background” style=”left:0; top:0; margin:0; width: 100%; height: 100%;”></div> <div style=”position: fixed; top: 45%; left: 45%;”> <i class=”fa fa-refresh fa-spin fa-5x fa-fw margin-bottom”></i> </div> </div> $(document).ajaxStart(function () { onBegin();...

HTML5 Data Attribute

HTML5 Data Attribute

Bu yazımca kısaca HTML5 ile birlikte gelen data attritube kullanımından bahsedeceğim. Bu attribute sayesinde HTML elemanları üzerinde (div, button, input vb.) istediğiniz bir veriyi(datayı) tutabiliyorsunuz. Data atrritube kullanımı şu şekildedir. data-data_adi=”data_degeri” “data-” yazımından dan sonra oluşturacağınız...