AJAX stands for Asynchronous JavaScript And XML. The basic concept is to use JavaScript and combine the fetching of XML (or JSON) data and make that data appear in some location of a web page without the page ever having been refreshed. This allows for dynamic content in an otherwise static page. w3schools.com describes it … Continue reading JavaScript: Intro to AJAX
JavaScript Language
JavaScript Web App: JavaScript ASCII Engine
The JavaScript ASCII Engine is a web tool I created to be able to quickly find ASCII values when a chart is not available. All you do is type in a single keyboard character in the input box and the tool will output the ASCII equivalent values in decimal, hex and binary. I created this … Continue reading JavaScript Web App: JavaScript ASCII Engine
JavaScript: How to identify the browser using navigator.userAgent
While it is not a good programming practice to code workarounds for various browsers and versions , it is helpful to know how to detect the user’s browser. For example: Here is the complete HTML code that includes JavaScript that will detect the user’s browser and other information such as operating system: Some key pieces of … Continue reading JavaScript: How to identify the browser using navigator.userAgent
Vue.js: How to install Vue.js on Ubuntu Linux
Vue.js requires that Node.js version 6.x is already installed. See this previous article for instructions on installing Node.js: JavaScript: How to install Node.js on Ubuntu Linux To install Vue.js, use each one of these commands in the Ubuntu terminal, in order: Command #1: sudo npm install –g vue-cli Command #2: vue init webpack myapp Where … Continue reading Vue.js: How to install Vue.js on Ubuntu Linux
JavaScript: How to install Node.js on Ubuntu Linux
To install Node.js version 6.x on Ubuntu Linux VM, start by going here: https://nodejs.org/ Click on the DOWNLOADS link at the top, then click on the “Installing Node.js via package manager” link. Then under “Debian and Ubuntu based Linux distributions“, there are two commands to use. Run these commands, in order, in the Ubuntu terminal. … Continue reading JavaScript: How to install Node.js on Ubuntu Linux
JavaScript: How to create alerts and pop-up windows
In JavaScript, alerts can be created easily using the built-in alert() function. For this first example, an alert is placed directly inside the button tag: <button onclick=”alert(‘I am an alert box!’);”>Example 1</button> Example 1 Here is a more complete example, showing in the HTML context: <!DOCTYPE html> <html> <body> <h2>JavaScript Alert Example 1</h2> <button onclick=”alert(‘I … Continue reading JavaScript: How to create alerts and pop-up windows
JavaScript: Demo of getElementById( )
Here is some JavaScript code that demonstrates how to use JavaScript to change HTML text on a page by clicking a button. When the button is clicked, the text is replaced with a random quote. Reset Demo This example uses DOM elements innerHTML and document.getElementById(). It also uses a couple of Math functions such as … Continue reading JavaScript: Demo of getElementById( )
Python and JavaScript: A comparison of the language basics
In this table I will compare some basic programming syntax and conventions between the Python and JavaScript programming languages. Programming element Python JavaScript Creating a variable that contains an int: age = 25 var age = 25; Creating a variable that contains a float: probability = 0.62 var probability = 0.62; Creating a variable that … Continue reading Python and JavaScript: A comparison of the language basics