Setting up a Cookie Consent Window

If you use cookies in your website, Cookie Conset Window is must. Read for more details Cookie Consent window with Vanilla JS //localStorage.removeItem("cookiesAccepted"); // this line is for testing only. always comment after testing // Check if the user has already accepted cookies if (!localStorage.getItem('cookiesAccepted')) { //alert("cookiesAccepted is " + localStorage.getItem('cookiesAccepted')); // Display the cookie…

React with Router,AJAX, Redux etc

In this session we will learn Router Link & Nav Link Higher Order Components(HOC) Programatic Redirects Axios (Nodejs utility for AJAX) Route Parameters Switch Tag to link only exact match Importing Images Redux Intro Integrating with Jquery Installations Required For Create React App and React basic stuff npx create-react-app my-app For extra utilities in this…

React Development Basics

Intro: Basics : components, events, templates, props and forms Router : routes, route paramenter, redirects Redux : stores,actions & reducers Samples Git https://github.com/iamshaunjp/react-redux-complete-playlist CDN Links https://reactjs.org/docs/cdn-links.html VS Code extensions that could be handy ES7 React/Redux/GraphQL/React Native Snippets by dsznajder Sublime babel by josh peng Browser extensions React Developer tools by facebook firefox , Chrome It…

React JS Introduction

About React.js is a JavaScript library for building user interfaces. It was created by Facebook and is now maintained by a large community of developers. React allows developers to build reusable UI components and manage the state of those components efficiently. With React, you can build complex and dynamic web applications with a high level…

AJAX with ‘fetch’

‘fetch’ is a feature added since ES6 GET fetch('http://example.com/movies.json') .then(response => response.json()) .then(data => console.log(data)); POST Old Version var url = 'YOUR URL HERE' var xhr = new XMLHttpRequest() const form = document.getElementById("form-id"); var formData = new FormData(form);// it could be new FormData() also xhr.open('POST', url, true); xhr.addEventListener('readystatechange', function(e) { if (xhr.readyState == 4 &&…

Tiny MCE Editor

TinyMCE Editor https://www.tiny.cloud/blog/ Latest versions(4+) ask for "Your Tiny API Key" Demo with version 3.4 Your API Key is a unique token that links your TinyMCE instances to your account. It grants you access to the Premium Features that you are subscribed to. To get Key word Register or Login Simplest Usage <!DOCTYPE html> <html>…

HTML DOCX

html-docx-js Demo with TinyMCE v3.5 This is a very small library that is capable of converting HTML documents to DOCX format thatis used by Microsoft Word 2007 and onward. It manages to perform the conversion in the browser byusing a feature called ‘altchunks’. In a nutshell, it allows embedding content in a different markuplanguage. We…

Syntax highlighting in Blogspot

At times you may want to add code in blogspot(http://www.blogger.com). It can be done with the following steps PS:There are many other similar services. Google "Syntax highlighting in Blogspot" to get an entire list Steps Visit code highlighter : http://ajblk.github.io/SyntaxHighlightGenerator-v3.0/OnlineGenerator.html Paste the code, select "language" & "code" Click "Get Formatted HTML" Preview Code Add External…