{"id":3195,"date":"2020-09-05T14:29:28","date_gmt":"2020-09-05T13:29:28","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=3195"},"modified":"2022-02-17T07:13:47","modified_gmt":"2022-02-17T07:13:47","slug":"qrcode-js-generate-qr-codes-in-browser","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/php\/qr-codes\/qrcode-js-generate-qr-codes-in-browser","title":{"rendered":"QRCode.js generate QR codes in browser"},"content":{"rendered":"\n<p>QRCode.js is a really simple javascript library that has the browser create the QR code itself (there is no image file created at the server)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Download library<\/h4>\n\n\n\n<p><a href=\"http:\/\/davidshimjs.github.io\/qrcodejs\/\">http:\/\/davidshimjs.github.io\/qrcodejs\/<\/a><\/p>\n\n\n\n<p>or<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/davidshimjs\/qrcodejs\">https:\/\/github.com\/davidshimjs\/qrcodejs<\/a><\/p>\n\n\n\n<p>Upload the file &#8220;qrcode.min.js&#8221; to your server (only file required).<\/p>\n\n\n\n<p>If your site doesn&#8217;t have jquery already then you&#8217;ll also need &#8220;jquery.min.js&#8221; (not required for WordPress sites for instance)<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Creating a QR Code<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>  &lt;div id=\"qrcode\" style=\"width:160px; height:160px; margin-top:10px;\">&lt;\/div>\n\n  &lt;!--&lt;script type=\"text\/javascript\" src=\"\/myjavascriptfiles\/jquery.min.js\">&lt;\/script>-->\n  &lt;script type=\"text\/javascript\" src=\"\/myjavascriptfiles\/qrcode.min.js\"\">&lt;\/script>\n\n  &lt;script type=\"text\/javascript\">\n    var qrcode = new QRCode(document.getElementById(\"qrcode\"), {\n      width : 160,\n      height : 160\n    });\n\n\n    qrcode.makeCode('qrcode.makeCode('http:\/\/mydomain.com\/myfile');');    \n  &lt;\/script><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">QR Code text field options<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">SMS QR Codes<\/h5>\n\n\n\n<p>Example: &#8216;SMSTO:+112345678:Hello this is the SMS message to send!&#8217;<\/p>\n\n\n\n<p><a href=\"http:\/\/goqr.me\/qr-codes\/type-qr-sms.html\">http:\/\/goqr.me\/qr-codes\/type-qr-sms.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>QRCode.js is a really simple javascript library that has the browser create the QR code itself (there is no image file created at the server) Download library http:\/\/davidshimjs.github.io\/qrcodejs\/ or https:\/\/github.com\/davidshimjs\/qrcodejs Upload the file &#8220;qrcode.min.js&#8221; to your server (only file required). If your site doesn&#8217;t have jquery already then you&#8217;ll also need &#8220;jquery.min.js&#8221; (not required for [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[269],"tags":[],"class_list":["post-3195","post","type-post","status-publish","format-standard","hentry","category-qr-codes"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/3195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=3195"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/3195\/revisions"}],"predecessor-version":[{"id":3197,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/3195\/revisions\/3197"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=3195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=3195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=3195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}