Category: Displaying data

Recent Post

Compress an Image File in the Browser with JavaScript

Using the HTML5 Canvas API, you can do image compression on the frontend.

Read a File into JavaScript using FileReader

After reading a file, you can display it, edit it, post it to a server and download.

Map Live User Location using Leaflet.js

Get user coordinates using the HTML5 Geolocation API and map using Leaflet.js.

Random Image with JavaScript

You can use JavaScript to display a random image, both on page load and when a user clicks to get ano

How to read and display a PDF using JavaScript

The native FileReader API can be used to read a PDF and create a URL to its contents.

Create a timestamp in JavaScript

The in-built Date() method can generate an accurate UNIX timestamp.

Getting and formatting date and time in JavaScript

Date and time objects created using the Date() constructor can be output in various formats.

Converting a number to a string with commas in JavaScript

How to print a number as a string with comma-formatting or other locale-specific styles.

Print the contents of a JavaScript object to the DOM

Printing a JavaScript object to the DOM is harder than you might think.

HTML Table of Contents Generator

A JavaScript solution for generating a table of contents for HTML content.