What is JavaScript?
First and foremost JavaScript is a client side scripting language used to improve the usbability and functionality of web sites and web applications.
A simple example of this is client-side validation. Without client side validation, a programmer would have to process the contents of a form via a web server, and then send a response back if the form was completed incorrectly. JavaScript can eliminate this by simply validating the data directly in a web browser.
JavaScript is also not the best ...
Read more →
JavaScript Budget Calculator
Do you need a quick and easy way to calculate your budget? If so, check out this JavaScript Budget Calculator.
Click here for the JavaScript Budget Calculator
JavaScript Budget Calculator Source Code
Are you a programmer interested in the source code of this JavaScript? If so, here it is:
(Just Copy and Paste into your HTML Editor and save as a .html file.)
Read more →
JavaScript Basics
Basics of JavaScript
This article was created to outline the basics of the JavaScript langauge.
JavaScript – Unsupported Browsers
When JavaScript is run in an unsupported browser, the script itself might be displayed as text within the browser. To prevent this from happening, it is best to use the HTML comment feature to comment out the code from the script.
For example:
<SCRIPT TYPE="text/javascript">
<!-- HIDE THE SCRIPT
FROM OTHER BROWSERS
JavaScript program
//
STOP HIDING FROM OTHER
BROWSERS -->
</SCRIPT>
HTML is commented ...
Read more →
Floating Point Numbers
Floating Point Numbers
While working on a JavaScript calculator I became stuck in what should be simple mathematics. The use of decimal points resulting in addition and subtraction caused erros in the calculations. The cause is in the way machine language calculates decimal points.
Oracle offers some great insight into the cause and resolution: What Every Computer Scientist Should Know About Floating-Point Numbers
The JavaScript Budget Calculator is a work in progress, to view how a machine interprets decimals check out ...
Read more →
Javascript Calculator
JavaScript Calculator
For a demo of the JavaScript calculator, click here
*You must have a JavaScript enabled browser for the JavaScript Calculator demo to work.
This calculator was created during a MindLeaders JavaScript tutorial. For more information on Mindreaders Tutorials and Training, go to:
http://www.mindleaders.com
JavaScript Calculator Source Code
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta content=”text/html; charset=utf-8″ http-equiv=”Content-Type” />
<title>JavaScript Calculator</title>
<script type=”text/javascript”>
var total = 0;
var lastOperation = “+”;
var newnumber = true;
function ...
Read more →
Java Script Browser Detection
Java Script Browser Detection & Redirection
Part of the process of web development includes testing to verify if a website
works in different browsers. Once you understand how the site will function in
each browser, you can better understand how to resolve errors. Although I do not
recommend the use of a client side script for detection and redirection for
high-traffic sites and/or web applications, I do recommend this script if you
are on a budget and/or you are in need ...
Read more →