Home arrow HTML arrow Page 4 - New Technologies and What They Mean To You: Part 1
HTML

New Technologies and What They Mean To You: Part 1


In the often confusing world of the web we hear new acronyms tossed around all the time. In this series of articles Jeremy will attempt to demistify some of the most common web related acronyms.

Author Info:
By: Jeremy Wright
Rating: 5 stars5 stars5 stars5 stars5 stars / 2
June 18, 2002
TABLE OF CONTENTS:
  1. · New Technologies and What They Mean To You: Part 1
  2. · HTML
  3. · Cascading Style Sheets
  4. · JavaScript
  5. · Conclusion

print this article
SEARCH DEVARTICLES

New Technologies and What They Mean To You: Part 1 - JavaScript
(Page 4 of 5 )

Definition (with help from dictionary.com)
(Formerly LiveScript) Netscape's simple, cross-platform, World-Wide Web scripting language. JavaScript is an interpreted scripting language developed to extend the functionality of webpages and to provide a certain amount of interaction with the website's users. Structured much like many "Application Languages" in terms of functions, properties, methods, etc, JavaScript lent the web it's first level of "programming", even though it isn't a programming language.

JavaScript relies on C-based syntax which looks much like:

Function funcName(param1,param2)
{
statement1;
statement2;
}


JavaScript can be included on a web page in one of 3 ways: externally, in-page and in-line. Externally means you have one JavaScript file which you can call from any of your webpages like so:

<script src="myJS.js" language="javascript"></script>

Including your JavaScript in-page is often done in the HEAD of your document, and allows any part of that page to access the JavaScript functions, methods and properties, and it looks like this:

<script language="javascript">
function someFunc()
{
window.alert('hello world!');
}
</script>


Including your JavaScript in-line is often the perfect solution for problems which only need solving once, such as letting a user know a certain piece of helpful information when they click on a link:

<a href="javascript:window.alert('This is a helpful hint!');">?</a>

What It Really Is
JavaScript is a scripting language that allows you to add interactivity to your web page. If you have ever seen a Clock on a page, a scrolling status bar, seen a new window open or had a web-form tell you some information wasn't filled in properly you have already seen JavaScript.

In the beginning, JavaScript was used mainly for "toys" like telling the user how long they had been on the page. Increasingly though it is developing a place as an essential part of any web-guru's toolkit. From the simple things like form validation to the complex things like drop-down menus and the like, JavaScript is showing that it has matured beyond the toy stage. In fact, you would be hard-pressed to find a large site which didn't utilise JavaScript in some respect.

Advantages
  • The ability to present information to users as and when it is pertinent
  • The ability to add interactivity
  • The ability to utilise the space on your pages more effectively
Disadvantages
  • The ability to present information to users as and when it is pertinent
  • The ability to add interactivity
  • The ability to utilise the space on your pages more effectively
Examples

Pop-Up Window Script:

<html>
<head>
<script language="JavaScript">
<!-- hide from JavaScript-challenged browsers
function openWindow(url, name) {
popupWin = window.open(url, name, 'width=400,
height=600,left=100,top=100')
}
// done hiding -->
</script>
</head>
<body onLoad="openWindow('myWin.html','newwin');">
</body>
</html>


Display an alert to the user:

<script language="javascript">
window.alert('You have selected an invalid option');
</script>


Similar Technologies
Though there are similar technologies in terms of style and even function (ECMAScript, JScript, etc) JavaScript stands above the pack as the one which is most tightly integrated into the pack.
blog comments powered by Disqus
HTML ARTICLES

- Does HTML5 Need a Main Element?
- Revisiting the HTML5 vs. Native Debate
- HTML5: Not for Phone Apps?
- HTML5 or Native?
- Job Hunting? Freelancer.com Lists This Quart...
- HTML5 in the News
- Report: HTML5 Mobile Performance Lags
- The Top HTML5 Audio Players
- Top HTML5 Video Tutorials
- HTML5: Reasons to Learn and Use It
- More of the Top Tutorials for HTML5 Forms
- MobileAppWizard Releases HTML5 App Builder
- HTML5 Boilerplate: Working with jQuery and M...
- HTML5 Boilerplate Introduction
- New API Platform for HTML5

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials