Easy Code Share > Javascript

Auto Refresh HTML Data in Web Page by 4 Methods

Auto Refresh HTML Data in Web Page by 4 Methods

There are 4 methods to auto refresh Html data in display boards such as currency rate boards, so that the web page keeps changing periodically. The former two methods are about that browsers are polling the host site actively to get newest data. In the latter two methods, browsers just passively receive notifications of status … Read more

Easy Code Share > Javascript

WebSocket Push Message to a Specific Client in Html

WebSocket Push Message to a Specific Client in Html

Unlike HTTP servers, WebSocket servers can push a message to a specific client in Html and JavaScript. The feature is valuable for many applications such as web chatting. This article starts from WebSocket basics that introduces the way how clients and servers talk. Subsequently, the demo example uses NodeJS to build a server that manages … Read more

Easy Code Share > Javascript

JavaScript Text to Speech Using Synthesis API

JavaScript Text to Speech Using Synthesis API

Friendly human interfaces sometimes require machine-generated voices. And Text-to-Speech technology in JavaScript can implement the requirement very well. When web pages read texts aloud like robots, people are just listening machine’s reporting without looking at screen monitors or mobile devices. The speech synthesis API provides the simplest way to create browser-based web pages capable of … Read more

Easy Code Share > Javascript

JavaScript Speech Recognition for Beginners

JavaScript Speech Recognition for Beginners

Sometimes, people require Speech-to-Text (STT) technique to make machines recognize oral commands. Now, we are introducing the simplest way to speech recognition in JavaScript. This tutorial is for beginners. It helps you create web pages recognizing what people talk by using Web Speech API services. All codes here are not complicated, so you can easily … Read more

Easy Code Share > Javascript

JavaScript Redirect POST Request Without Data Limit

JavaScript Redirect POST Request Without Data Limit

Rather than AJAX staying in the same HTML, sometimes, developers have to redirect to different URL using POST requests. We provide tricky JavaScript codes to redirect a POST request with no parameters limit. Comparison with GET request method are given in the example, too. All codes here are not complicated, so you can easily understand … Read more

Easy Code Share > Javascript

PHP RSA Encrypt and Generate Keys in Server Site

PHP RSA Encrypt and Generate Keys in Server Site

PHP RSA library in server sites can generate key pairs and perform public key cryptography. Server sites expose generated public key to all clients, so asymmetric encrypt scheme protect data by using private and public keys. If prefering to generate keys on browser clients, you can read the post Javascript RSA Generate Keys from Browser … Read more

Easy Code Share > Javascript

Javascript RSA Generate Keys from Browser Client

Javascript RSA Generate Keys from Browser Client

We introduce a JavaScript RSA library that can be used with HTML browser, rather than with Node.js. Browser clients can generate keys with specified key size. The server sites receive public keys from clients for encrypting data in the future. If prefering to generate keys in server sites, you can read the post PHP RSA … Read more

Easy Code Share > Javascript

MQTT JavaScript Example to a Free MQTT Server

Mqtt JavaScript Example to a Free Mqtt Server

We provide MQTT client example using JavaScript, which can be executed on browsers. Furthermore, for beginner, there is a free MQTT server to use for testing. Finally, we suggest when to use MQTT on applications. All codes here are not complicated, so you can easily understand even though you are still students in school. To … Read more

Easy Code Share > Javascript

Using 3 Events to Sign a Signature on HTML5 Canvas

Using 3 Events to Sign a Signature on HTML5 Canvas

You can sign a signature on HTML5 Canvas by moving mouses. Listening to 3 mouse events, we discover a straight-forward and event-driven approach to do it. Furthermore, you can save your signature as an image file. All codes here are not complicated, so you can easily understand even though you are still students in school. … Read more

Easy Code Share > Javascript

7 Steps for HTML Bar Chart Using Javascript Canvas

HTML Canvas Bar Chart using Javascript by 7 Steps

This article offers a complete approach of building a HTML bar chart using JavaScript canvas. In 7 steps, you can customize your bar chart with designed bar colors and the legend to distinguish them. More than one series of data can be set in the chart. Essentially, the JS object is truly in clear codes … Read more