JavaScript the Definitive Guide

by David Flanagan
There have been many changes in the world of web programming with JavaScript since the third edition of this book was published, including:
  • Second and third editions of the ECMA-262 standard have been published, updating the core JavaScript language. Conformant versions of Netscape's JavaScript interpreter and Microsoft's JScript interpreter have been released.
  • The source code for Netscape's JavaScript interpreters (one written in C and one written in Java) has been released as open source and is available to anyone who wants to embed a scripting language in his application.
  • The World Wide Web Consortium (W3C) has published two versions (or levels) of a Document Object Model (DOM) standard. Recent browsers support this standard (to varying degrees) and allow client-side JavaScript to interact with document content to produce sophisticated Dynamic HTML (DHTML) effects. Support for other W3C standards, such as HTML 4, CSS1, and CSS2, has also become widespread.
  • The Mozilla organization, using source code originally contributed by Netscape, has produced a good fifth-generation browser. At the time of this writing, the Mozilla browser is not yet at the 1.0 release level, but the browser is mature enough that Netscape has based its 6.0 and 6.1 browsers upon the Mozilla code base.
  • Microsoft's Internet Explorer has become the overwhelmingly dominant browser on desktop systems. However, the Netscape/Mozilla browser remains relevant to web developers, especially because of its superior support for web standards. In addition, minor browsers such as Opera and Konquerer should be seen as equally relevant.
  • Web browsers (and JavaScript interpreters) are no longer confined to the desktop but have migrated to PDAs and even cell phones.
In summary, the core JavaScript language has matured. It has been standardized and is used in a wider variety of environments than it was previously. The collapse of Netscape's market share has allowed the universe of desktop web browsers to expand, and JavaScript-enabled web browsers have also become available onnon-desktop platforms. There has been a distinct, if not complete, move toward web standards. The (partial) implementation of the DOM standard in recent browsers gives web developers a long-awaited vendor-independent API to which they can code.
Read More/Download

From DHTML to DOM scripting

By Chris Heilmann
In this article we will try to help JavaScript beginners to spot old and outdated JavaScript techniques and explain what their issues are. We do this by looking at a web page that might have been developed around the millennium with development ideas that were good at the time (DHTML), but result in inaccessible or even broken pages in today's web environment.
If you want to take a look at the code examples offline, you can download the example site as a zip.
This article is aimed at developers who are new to JavaScript, or those who haven't touched it in a while and wonder why people tell them off for using techniques that were the bee's knees in 1999.
We will take a demonstration page that features three dynamic elements using JavaScript, take a look at how they were achieved, and give an example of a modern way of re-creating them more future-proof and less in the way of the visitor (DOM scripting). Let's start with a bit of background knowledge about what DHTML and the DOM are.
Read More/Download

JavaScript Essentials

By Neil Smyth
Before JavaScript was created, a typical web browsing experience consisted largely of displaying static pages of information. Any type of user interaction with a web page usually involved the browser sending information back to the web server where some type of server based script or other program would validate the user's data input. The server would then send back either a static error page if the user had entered invalid data or, assuming successful validation, return a static page to the web browser containing the results of the transaction. In addition, the lack of a mechanism to implement dynamic web page content and behavior dictated that an entirely new web page be loaded in order to display new information.
It quickly became clear that a way of performing "client-side" or "web browser-side" processing was needed. The original intent for JavaScript, therefore, was to address this need by facilitating such tasks as validating user input before it is transmitted to the web server, and creating dynamic web page content and layouts independently of the web server (for example, displaying different text depending on a user's actions within the page).
JavaScript met and, indeed, exceeded these requirements by providing an extremely flexible and intuitive scripting language. The problem today is that, as with any useful technology, JavaScript has been used in ways never anticipated by its original authors. As a result, the potential uses of JavaScript have grown far beyond the needs of the average person looking to add dynamic behavior to web pages. The result of this is that JavaScript book authors also feel the need to cover every possible capability of JavaScript, often to the extent that the average JavaScript reference book now runs to over 1,000 pages.
The purpose of this book, therefore, is to provide the essentials of JavaScript so that anyone with a web site can use this powerful scripting language quickly and effectively without having to learn things that, whilst within the capabilities of JavaScript, aren't actually needed by the average web designer. That said this book does not take any shortcuts. It provides detailed and in depth knowledge of all aspects of JavaScript from language basics through to advanced topics.
This book is designed to provide a detailed and comprehensive, yet easy to follow, guide to developing powerful, dynamic web pages using JavaScript. It could be said that the object of JavaScript Essentials is to provide you with everything you need to use JavaScript, and nothing that you don't.
Read More/Download

Simply JavaScript

By Kevin Yank and Cameron Adams
What’s Covered in this Book?
  • Chapter 1: The Three Layers of the Web: A big part of learning JavaScript is learning when it’s the right tool for the job, and when ordinary HTML and CSS can offer a better solution. Before we dive into learning JavaScript, we’ll take a little time to review how to build web sites with HTML and CSS, and see just how JavaScript fits into the picture.
  • Chapter 2: Programming with JavaScript: JavaScript is a programming language. To work with it, then, you must get your head around the way computer programs work—which to some extent means learning to think like a computer. The simple concepts introduced in this chapter—statements, variables, expressions, loops, functions, and objects—are the building blocks for every JavaScript program you’ll ever write.
  • Chapter 3: Document Access: While certain people enjoy writing JavaScript code for its own sake, you wouldn’t want to run into them in a dark alley at night. As a well-adjusted web developer,you’ll probably want to use JavaScript to make changes to the contents of yourweb pages using the Document Object Model (DOM). Lucky for you, we wrote a whole chapter to show you how!
  • Chapter 4: Events: By far the most eventful portion of this book (ha ha ha … I slay me), this chapter shows you how to write JavaScript programs that will respond to the actions of your users as they interact with a web page. As you’ll see, this can be done in a number of ways, for which varying degrees of support are provided by current browsers.
  • Chapter 5: Animation: Okay, okay. We can talk all day about the subtle usability enhancements that JavaScript makes possible, but we know you won’t be satisfied until you can make things swoosh around the page. In this chapter, you’ll get all the swooshing you can handle.
  • Chapter 6: Form Enhancements: I know what you’re thinking: forms are boring. Nobody leaps out of bed in the morning, cracks their knuckles, and shouts, “Today, I’m going to fill in some forms!” Well, once you trick out your forms with the enhancements in this chapter, they just might. Oh, and just to spice up this chapter a bit more, we’ll show you how to make an element on your page draggable.
  • Chapter 7: Errors and Debugging: When things go wrong in other programming languages, your computer will usually throw a steady stream of error messages at you until you fix the problem. With JavaScript, however, your computer just folds its arms and gives you alook that seems to say, “You were expecting, maybe, something to happen?” No, English is not your computer’s first language. What did you expect? It was made in Taiwan. In this chapter, we’ll show you how to fix scripts that don’t behave the way they should.
Read More/Download

JavaScript cheat sheet

The JavaScript cheat sheet is designed to act as a reminder and reference sheet, listing methods and functions of JavaScript. It includes reference material for regular expressions in JavaScript, as well as a short guide to the XMLHttpRequest object. A description of what is on the cheat sheet follows, or if you are impatient, you can go straight to the full size JavaScript cheat sheet.
JavaScript has a huge number of methods and functions available. The cheat sheet lists these in various sections. On the left is a list of simple methods in JavaScript. On the right are DOM methods. Functions are in their own section at the bottom of the page.
The XMLHttpRequest object is relatively new to JavaScript. It is used to make requests and receive responses in XML format from a server, allowing developers to create interactivity with the server without the need for page refreshes (see the "Live Search" on the right of this page for an example). This section of the cheat sheet is a short reference to the object, containing a list of useful methods and properties, the syntax for creating the object in different browsers, and the various readyState values.
Read More/Try It

Acrobat JavaScript Scripting Guide

Welcome to the Adobe Acrobat JavaScript Scripting Guide. This scripting guide is designed to provide you with an overview of how you can use Acrobat JavaScript to develop and enhance standard workflows, such as:
  • Printing and viewing
  • Spell-checking
  • Stamping and watermarking
  • Managing document security and rights
  • Accessing metadata
  • Facilitating online collaboration
  • Creating interactive forms
  • Customizing interaction with Web Services
  • Interacting with databases
Here you will find detailed information and examples of what the Acrobat JavaScript capabilities are and how to access them, as well as descriptions of the usage of the SDK tools. Acrobat JavaScript is a powerful means by which you can enhance and extend both Acrobat and PDF document functionality.
Acrobat JavaScript is a language based on the core of JavaScript version 1.5 of ISO-16262, formerly known as ECMAScript, an object-oriented scripting language developed by Netscape Communications. JavaScript was created to offload Web page processing from a server onto a client in Web-based applications. Acrobat JavaScript implements extensions, in the form of new objects and their accompanying methods and properties, to the JavaScript language. These Acrobat-specific objects enable a developer to manage document security, communicate with a database, handle file attachments, manipulate a PDF file so that it behaves as an interactive, web-enabled form, and so on. Because the Acrobat-specific objects are added on top of core JavaScript, you still have access to its standard classes, including Math, String, Date, Array, and RegExp.
Read More/Try it

HTML Code Tutorial

This HTML tutorial provides the most helpful and complete guide to creating web pages anywhere. This HTML code tutorial comprises following web designing topics.

* Applets
* Comments
* CSS
* Document Tags
* Embedded Objects
* Fonts
* Forms
* Frames
* Images
* Lines & Paragraphs
* Links
* Lists
* Logical Tags
* Scripts
* Sounds
* Symbols
* Table
* Weird Tags
Popular sections in this tutorial are HTML Quick List and Popup Window Tutorial.
  • HTML Quick List A complete list of all tags and attributes, with links to pages about each of them.
  • Popup Window Tutorial A complete tutorial on creating "popup windows", including working examples and ready-to-use scripts.
Moreover help forums are there for FAQ, General, Forms, Tables, Frames, CSS, DHTML, HTML Tools. You can read or download this HTML Code tutorial from the below given link.
Read More/Download
Related CGI, CSS, DHTML, HTML, Javascript and XML free Ebooks and Tutorials
  1. Download 1
  2. Download 2
Buy HTML books
  1. Head First HTML with CSS & XHTML
  2. HTML, XHTML, and CSS, Sixth Edition (Visual Quickstart Guide)

Download free javascript, xml, css, html ebooks

This posting helps you to get free ebooks on cascading style sheets (css), javascript, cgi scripting, comon gateway interface, core javascript, extensible markup language (xml), dynamic html, hyper text markup language (html), processing xml with java, xml databases, etc. You can master mentioined subjects by downloading these ebooks.
Visit this javascript, xml, html free ebooks provided in following links.
  1. 40 CSS Tutorial Reference
  2. A Query Language for XML
  3. Advanced Javascript Tutorials
  4. Beginner's Guide to CGI Scripting with Perl By John Callender
  5. Cascading Style Sheets
  6. Cascading Style Sheets, level 1
  7. Cascading Style Sheets, level 2
  8. CGI - Common Gateway Interface support for Python
  9. CGI - Simple Common Gateway Interface Class By Lincoln D. Stein
  10. CGI Developer's Guide by Eugene Eric Kim
  11. CGI Manual of Style Online by Robert McDaniel
  12. CGI Programming 101: Learn CGI Today
  13. CGI Programming FAQ By Nick Kew
  14. CGI programming in Perl
  15. CGI Programming on the World Wide Web By Shishir Gundavaram
  16. CGI Programming Unleashed By Eugene Eric Kim
  17. CGI Tutorial By Nik Silver
  18. CGI::Base - HTTP Daemon Common Gateway Interface (CGI) Base Class
  19. CGI::Carp - CGI routines for writing to the HTTPD (or other) error log
  20. CGI::Fast - CGI Interface for Fast CGI By Lincoln D. Stein
  21. CGI::Pretty - module to produce nicely formatted HTML code By Brian Paulsen
  22. Common Gateway Interface in Python - An Interactive Instruction
  23. Complete CSS Guide By John Allsopp and Maxine Sherrin
  24. Comprehensive CSS Guide by Marcus Kazmierzak
  25. Core JavaScript Reference
  26. CSS 2 Tutorial By Miloslav Nic
  27. CSS 2.1 Specification
  28. CSS Attributes: Index -MSDN Library
  29. CSS Frequently Asked Questions By HÃ¥kon Wium Lie and Bert Bos
  30. CSS Online - Explore the World of CSS
  31. CSS Pointers Group's CSS Example
  32. CSS Quick Tutorials
  33. CSS-guide By Tapio Markula
  34. DocBook: The Definitive Guide By Norman Walsh & Leonard Muellner
  35. Embedding Perl in HTML with Mason By Dave Rolsky and Ken Williams
  36. Extensible Markup Language (XML)
  37. Extensible Markup Language (XML) 1.0
  38. Ground Zero XML Tutorial
  39. Guide to Writing CGI Scripts in REXX and Perl
  40. How to Use HTML 3.2 By Scott Arpajian And Robert Mullen
  41. HTML 3.2 and CGI Professional Reference Edition Unleashed
  42. HTML By Example by Todd Stauffer
  43. HTML Encyclopaedia
  44. Introduction to CSS shorthand properties
  45. Introduction to CSS3
  46. Introduction to Dynamic HTML By Aaron Weiss
  47. Introduction to JavaScript
  48. Introduction to XML for web developers
  49. Introduction to XML from w3schools.com
  50. JavaScript Advanced Tutorials
  51. JavaScript Authoring Guide
  52. JavaScript Authoring Info By John Russell
  53. JavaScript Manual of Style By Marc Johnson
  54. JavaScript Primer
  55. JavaScript The Definitive Guide - Fourth Edition by David Flanagan
  56. Javascript Tutorial
  57. ppk on JavaScript By Peter-Paul Koch
  58. Processing XML with Java By Elliotte Rusty Harold
  59. RichInStyle.com CSS1 tutorial
  60. RichInStyle.com CSS2 tutorial
  61. Sams Teach Yourself JavaScript in 24 Hours
  62. Softsteel WML Tutorial
  63. Special Edition Using CGI By Jeffry Dwight and Michael Erwin
  64. Special Edition Using HTML 4 (c) Macmillan Computer Publishing
  65. Special Edition USING HTML Second Edition
  66. Special Edition Using JAVASCRIPT By Mark C. Reynolds
  67. Style Master CSS Tutorial
  68. Style Sheets
  69. Tableless layout HOWTO
  70. Teach Yourself HTML 3.2 in 24 Hours By Dick Oliver
  71. Teach Yourself JavaScript in a Week By Arman Danesh
  72. Teach yourself WEB Publishing with HTML in 14 days By Laura Lemay
  73. The Common Gateway Interface
  74. The XML Files: Using XML for Business-to-Business and Business-to-Consumer Applications
  75. Transferring data between XML documents and relational databases
  76. Using HTML 3.2, Java 1.1, and CGI By Eric Ladd and Jim O'Donnell
  77. Using Python for CGI programming By Guido van Rossum
  78. Voodoo’s Introduction to Javascript By Stefan Koch
  79. W3C httpd CGI/1.1 Script Support
  80. Web Style Sheets CSS tips & tricks
  81. Writing World-Wide Web CGI Scripts in REXX
  82. XForms Essentials by Micah Dubinko
  83. XML - Free Chapters
  84. XML and Databases By Ronald Bourret
  85. XML Basics - An Introduction to XML by Jan Egil Refsnes
  86. XML Certification Tutorial By Vibha Verma
  87. XML for DB2 Information Integration
  88. XML Road Map
  89. XQL (XML Query Language) By Jonathan Robie
  90. XSL Concepts and Practical Use
  91. XUL Programmer's Reference Manual
  92. Zen Garden -The Beauty of CSS Design

Advanced Javascript Tutorials

From JavaScript Kit
Latest Tutorials
  • JavaScript and memory leaks -If you're not careful, your JavaScript code may leak memory and sometimes even bring the visitor's browser to its knees. This tutorial looks at different leak patterns in JavaScript and how to fix them.
  • JavaScript Closures 101- they're not magic - Morris Johns explains JavaScript closures, a powerful yet often bewildering concept, in a gentle, step by step fashion.
  • Conditional Compilation of JScript/ JavaScript in IE - IE supports a little known feature called conditional compilation that selectively compiles any block of JScript or JavaScript depending on your script logic. Think of it as the absolute form of object detection.
  • External JavaScript and PHP - External JavaScript can reference not just .js files, but PHP scripts as well. See how this is done, and the wonderful possibilities linking PHP to JavaScript bring.
  • Changing Select element content on the fly - This tutorial explains how to change a select element's content using JavaScript, from adding new options to modifying and deleting them. It also shows how to create a 2 level interdependent select list.
  • Determining cookie support in client's browser - If your script relies on JavaScript cookies to store and persist information, it's a good idea to always first make sure the user's browser has cookies enabled. This tutorial shows you how to perform this detection.
    Sorting and filtering a Tabular Data Control - A Tabular Data Control can easily be sorted and filtered before its data is shown on the page. The following two tutorials examine this:- Sorting a Tabular Data Control- Filtering a Tabular Data Control
  • Introduction to Tabular Data Control (IE) - Tabular Data Control is a Microsoft ActiveX control that comes pre-installed with all versions of IE4+. This useful control allows you to access, display, and sort ASCII information stored on the server end, such as a .txt file. In other words, it creates a simple client side "database." Learn about TDC and how to use JavaScript to manipulate it in this tutorial.
  • Introductory Guide to Regular Expressions - Always wanted to learn about Regular Expressions in JavaScript? With this comprehensive yet gentle tutorial on the subject, you'll be on your way to slashing and validating string input using Regular Expressions in no time!
  • Programmer's Guide to Regular Expressions - Concise, to-the-point tutorial on Regular Expressions with sections on more advanced aspects of the feature.
  • JavaScript and Object Oriented Programming (OOP) - JavaScript may not be known for its object oriented properties, but it does support most of the features required to be considered an Object Oriented language. See how to write OOP code in JavaScript.
  • Formatting numbers for decimals and significant digits - Need to display a number in currency format? How about a number that is x digits in length? See how to easily, using two new methods of JavaScript 1.5+.

Click to Read More

Introduction to Dynamic HTML

By Aaron Weiss
Dynamic HTML builds upon existing HTML standards to expand the possibilities of Web page design, presentation, and interaction. Ultimately, mastering DHTML will allow you to build Web-based applications, rather than mere portraits of data. Because DHTML is essentially an "added value" technology, you should be rather familiar with basic Web page design using traditional HTML specifications. Experience with JavaScript programming is also necessary to employ the potential of DHTML. Consequently, portions of this introduction to DHTML will assume some HTML and JavaScript familiarity.
What and Why
The Web is an ever evolving environment, and Web pages themselves are steadily blooming from static displays of data to interactive applications. "Dynamic HTML" is somewhat of an umbrella term encompassing several ways in which Web developers can breathe life into pages which have traditionally been still portraits of information.
The basic notion behind Dynamic HTML is quite simple: allow any element of a page to be changeable at any time. Sounds like a dream, but as with any simple plan, "God is in the details," as they say. In the olden days, you could only change content on a page via CGI. This required a server to perform the changes to the page and re-serve the entire page, modifications and all, back to the client. While workable, this process was quite slow, as it placed a burden on both network traffic and server processing time. With long delays between a user's action and an on-screen response, building effective Web-based applications was quite constricting.
With DHTML, the magic occurs entirely on the client-side. This means that page modifications should appear immediately following a trigger, such as a user selection. And, remember, the DHTML dream is that you can modify any aspect of the currently loaded page -- text styles, swapped images, context-sensitive forms and tables, and even the on-screen data itself.
It's worth noting here, then, that "Dynamic HTML," isn't really about HTML, the markup language. By and large, DHTML describes the abstract concept of breaking up a page into manipulable elements, and exposing those elements to a scripting language which can perform the manipulations. The degree, or fineness, to which these elements are defined and actionable is a function of DHTML's maturity. And since it has only been around for a year or so, DHTML is not fully mature.
Like the Web itself, Dynamic HTML is ever evolving. At some point, DHTML may self actualize and reach its full potential of "change anything anywhere anytime." It may even change its name -- product developers possess a whimsy for this sort of thing -- but the concepts defined above for modifying elements on a page will necessarily continue to mature.

Using HTML 3.2, Java 1.1, and CGI

By Eric Ladd and Jim O'Donnell
This book was designed and written from the ground up with two important purposes:
  • First, Platinum Edition Using HTML 3.2, Java 1.1, and CGI makes it easy for you to find the most effective means to accomplish any task that needs to be done or present most any kind of information that can be served on the Web.
  • Second, this book covers the major Web technologies-not only HTML, Java, and CGI, but also VRML, Web browser scripting languages such as JavaScript and VB Script, and the full range of Microsoft's ActiveX technologies-in a depth and breadth that you won't find anywhere else. It has been expanded well beyond the best-selling Special Edition Using HTML, Second Edition, including almost 500 additional pages of in-depth technical detail, tips, techniques, and troubleshooting solutions. It also includes two CD-ROMs of Web software and HTML versions of some of Que's other related books.

With these goals in mind, how do you use this book?

If you are familiar with HTML and with setting up Web pages and Web sites, you may be able to just skim through the first couple of chapters to see what some of the issues in page and site design are and glance through the basic HTML elements discussed in the first two or three parts. Even if you are familiar with HTML, there may be some information in them that will be new to you. You can then read the advanced sections on HTML, as well as the sections on other Web technologies such as JavaScript and Java, CGI, VRML, and ActiveX technologies to determine which of those elements you want to include in your Web pages.

Platinum Edition Using HTML 3.2, Java 1.1, and CGI was written with the experienced HTML programmer in mind. Your experience may be limited to a simple Web home page you threw together, or you may be designing and programming Web sites. Either way, you will find comprehensive coverage on HTML and other Web technologies. Throughout this book, there are techniques for creating quality, effective Web pages and Web sites.

Click to Read More

Encyclopedia of HTML elements

by Emil Stenström
HTML is a much richer language than what it’s used for. There are 77 elements and each one has a certain purpose. It is possible to find that reason by reading the specification, but who does that? I wrote this list as a way to tell you what I think each of the HTML tags should be used for, common problems you might encounter, and general advise about each one.

I’ve included all the elements from HTML 4.01 Strict. It’s a long one, but I’m sure you have more “tips and tricks” to add to it. Leave a comment and I’ll add yours to the list too. Let’s start off with a list of all the elements:

A, ABBR, ACRONYM, ADDRESS, AREA, B, BASE, BDO, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CITE, CODE, COL, COLGROUP, DD, DEL, DFN, DIV, DL, DT, EM, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HEAD, HR, HTML, I , IMG, INPUT, INS, KBD, LABEL, LEGEND, LI, LINK, MAP, META, NOSCRIPT, OBJECT, OL, OPTGROUP, OPTION, P, PARAM, PRE, Q, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRONG, STYLE, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, UL, VAR

For people that view this site in a visual browser I added colored bars on all the elements. They represent if an element is recommended to use or not. Green bar means “Use this!”, Yellow means “Consider if you really need it”, and Red means “Don’t use this unless you have a really good reason”.

Click to Read More

CGI Programming Unleashed

By Eugene Eric Kim
The first things you should know about Common Gateway Interface (CGI) are what it is and why it is used. CGI is a standard whose specification defines a way for Web servers to communicate with external programs, and vice versa, so that the external program can generate HTML, images, or whatever, and have the server treat it the same as HTML, images, and so on not generated by an external program. The reason CGI is used is so you can generate dynamic content with the same ease that you generate static content. CGI is used because it is a very well defined and supported standard, and without CGI, dynamic content would have been impossible without proprietary server methods (now, there are alternatives to CGI that are becoming standard).
There are many useful applications of CGI programs. But, as with every other technology, CGI programs have their limits. Also, as with many other technologies, it is not always the best way to do things. For this reason, this chapter will go over what CGI programs can and cannot do, and what CGI based apps are good and bad for.
For comparison's sake, I use Java as the applet language.
What CGI Is Useful For
As stated earlier, CGI is useful for many different tasks. There are different reasons why it is the best method, or the only method, for a variety of tasks. This chapter examines the reasons, separating the tasks into three different levels. First, we cover simple tasks, which we will define as tasks that can be completed in a couple of hours and/or require almost no knowledge of how to program CGI apps/the CGI spec in general. This task level includes counters, among other things. Next, we cover intermediate tasks, which we will define as tasks that can be completed in a day or two and/or tasks that require a pretty good knowledge of how to program CGI apps/the CGI spec in general. This task level includes built from scratch imagemapping programs, apps that generate entire HTML pages, and apps that do animation, among other things. Finally, we cover advanced tasks, which we will define as tasks that take more than a day or two and/or require an expertise in CGI app programming/the CGI spec in general. This task level includes apps that include a home grown database engine, among other things.

Special Edition Using CGI

By Jeffry Dwight and Michael Erwin
The Common Gateway Interface, or CGI, is one of the most useful tools in a Webmaster's kit. Whether you're the lone maintainer of a single home page on someone else's machine or the Webmaster of a huge domain, you'll find that CGI is essential for anything beyond presenting static text and graphics.
CGI is the magic behind Web-based interactive games, page counters, order-entry systems, online shopping carts, SQL database interfaces, animations, and clickable images. In fact, you'll find that CGI, in one of its many forms, is what brings the World Wide Web to life.
We assume throughout the book that you have at least an intermediate understanding of programming in one or more languages. This book won't teach you how to program, but it will teach you how to use your existing programming skills to make CGI scripts work.
We didn't shy away from complicated topics, but we made sure to cover the fundamentals, too. In all, if you're comfortable with C, Perl, Visual Basic, or AppleScript, you should be able to glean a great deal of information from these pages.
We explain the basics of CGI programming fairly well, so even if you've never thought of writing CGI before, you'll do fine. If you're already an accomplished CGI programmer, you'll find hundreds of tips and tricks throughout the book to expand your repertoire.
Where possible, we used pseudocode or a textual description of the process under discussion. We did this for a couple of reasons: First, this book is intended to be platform-independent, meaning that you should be able to profit from it no matter what server you run and no matter what programming environment you use. Second, a textual description forces the reader (and the author) to focus on the process rather than the syntax. The goal is for you to understand how the magic works, not just what to type.
You'll also find a lot of actual code, both in the pages of the book and on the accompanying CD-ROM. We assume that programmers, once they understand the concepts, will want to go forth and create programs. What better way than to be armed with working samples?

XForms Essentials

by Micah Dubinko
You should read this book if you want to:
  • Create XForms files in a text or XML editor
  • Convert existing forms (electronic or paper) to XForms
  • Collect XML data from users in a user-friendly way
  • Reduce the amount of JavaScript needed within browser interfaces
  • Increase the security and reliability of your current information system by combining client-side and server-side checks into a common code base
  • Understand how to create interactive web sites using the latest standard technology

This book is organized into three divisions. The first gives a general introduction to web forms, including information on the history and basic construction of forms. The second section serves as a kind of reference manual to the XForms specification. The third section offers additional hints, guidelines, and techniques for working with XForms.

If you simply want to fill out a form, you need only acquire the appropriate software or browser plug-in. There's no need for you to know what's going on behind the scenes unless you wish to satisfy your commendable intellectual curiosity.

If you wish to create forms with a designer program that has XForms export capability, just read that program's documentation to learn how to use that program feature. XForms goes to great lengths to make the fill-out experience intuitive; reading instructions is not required.

Click to Read More

JavaScript Advanced Tutorials

Latest Tutorials
  • JavaScript and memory leaks - If you're not careful, your JavaScript code may leak memory and sometimes even bring the visitor's browser to its knees. This tutorial looks at different leak patterns in JavaScript and how to fix them.
  • JavaScript Closures 101- they're not magic - Morris Johns explains JavaScript closures, a powerful yet often bewildering concept, in a gentle, step by step fashion.
  • Conditional Compilation of JScript/ JavaScript in IE - IE supports a little known feature called conditional compilation that selectively compiles any block of JScript or JavaScript depending on your script logic. Think of it as the absolute form of object detection.
  • External JavaScript and PHP - External JavaScript can reference not just .js files, but PHP scripts as well. See how this is done, and the wonderful possibilities linking PHP to JavaScript bring.
  • Changing Select element content on the fly - This tutorial explains how to change a select element's content using JavaScript, from adding new options to modifying and deleting them. It also shows how to create a 2 level interdependent select list.
  • Determining cookie support in client's browser - If your script relies on JavaScript cookies to store and persist information, it's a good idea to always first make sure the user's browser has cookies enabled. This tutorial shows you how to perform this detection.
    Sorting and filtering a Tabular Data ControlA Tabular Data Control can easily be sorted and filtered before its data is shown on the page. The following two tutorials examine this:- (1) Sorting a Tabular Data Control (2) Filtering a Tabular Data Control
  • Introduction to Tabular Data Control (IE) - Tabular Data Control is a Microsoft ActiveX control that comes pre-installed with all versions of IE4+. This useful control allows you to access, display, and sort ASCII information stored on the server end, such as a .txt file. In other words, it creates a simple client side "database." Learn about TDC and how to use JavaScript to manipulate it in this tutorial.
  • Introductory Guide to Regular Expressions - Always wanted to learn about Regular Expressions in JavaScript? With this comprehensive yet gentle tutorial on the subject, you'll be on your way to slashing and validating string input using Regular Expressions in no time!
  • Programmer's Guide to Regular Expressions - Concise, to-the-point tutorial on Regular Expressions with sections on more advanced aspects of the feature.
  • JavaScript and Object Oriented Programming (OOP) - JavaScript may not be known for its object oriented properties, but it does support most of the features required to be considered an Object Oriented language. See how to write OOP code in JavaScript.
  • Formatting numbers for decimals and significant digits - Need to display a number in currency format? How about a number that is x digits in length? See how to easily, using two new methods of JavaScript 1.5+.

Click to Read More

JavaScript Authoring Info

By John Russell
JavaScript (aka ECMAScript) is a relatively easy way to make your website visually attractive to clients and other viewers by adding interactivity and dynamics to HTML pages. This page explains why one would use JavaScript in their HTML website design. JavaScript can also be used as a basis for writing utility programs that are platform independent. Programming concepts learned in JavaScript can be rolled over into Java or any modern object oriented language. This page also has links to JavaScript code repositories and references for those who prefer not to reinvent wheels. And finally for those who do prefer to roll their own there are my programming notes, some introductory tutorials, small projects, larger projects and form projects pages.
Why Use JavaScript
  • Why should a webpage author use JavaScript in addition to HTML?
  • Javascript adds user interactivity.
  • Javascript enhances visual displays.
  • Javascript allows client-side user form validation.
  • Javascript provides more seamless integration with user plug-ins.
  • Javascript allows access to some system information that HTML does not.

Language Design Issues

  • Because JavaScript uses a high-end approach to security (leaving lapses in the domain of the browser) there are some applications that it is not appropriate for:
  • JavaScript does not have user file access. You must use cut/paste techniques to input or save data.
  • JavaScript does not have a print method. You must create an HTML page and use the browser menu to print.
  • JavaScript cannot run programs on the host machine unless it is through browser plug-ins or associations allowed within the browser.
  • JavaScript has no access to the user environment other than what the browser provides. Hence no access to the Windows registry is possible.
  • JavaScript is definitely not a system programming language! Use Java or C++ for this type of activity.

Click to Read More

Core JavaScript Reference

This book is a reference manual for the core JavaScript language for version 1.5. JavaScript is Netscape's cross-platform, object-based scripting language. Core JavaScript can be extended for a variety of purposes by supplementing it with additional objects.

JavaScript version 1.5 provides the following features and enhancements:

  • Runtime errors. Runtime errors are now reported as exceptions.
  • Number formatting enhancements. Number formatting has been enhanced to include Number.prototype.toExponential, Number.protoytpe.toFixed and Number.prototype.toPrecision methods. See page 127, page 128, and page 129.
  • Regular expression enhancements:
    (1) Greedy quantifiers - +, *, ? and {} - can now be followed by a ? to force them to be non-greedy. See the entry for ? on page 148.
    (2) Non-capturing parentheses, (?:x) can be used instead of capturing parentheses(x). When non-capturing parentheses are used, matched subexpressions are not available as back-references. See the entry for (?:x) on page 148.
    (3) Positive and negative lookahead assertions are supported. Both assert a match depending on what follows the string being matched. See the entries for (?=) and (?!) on page 148.
    (4) The m flag has been added to specify that the regular expression should match over multiple lines. See page 146.
  • Conditional function declarations. Functions can now be declared inside an if clause. See page 221.
  • Function expressions. Functions can now be declared inside an expression. See page 254.
  • Multiple catch clauses. Multiple catch clauses in a try...catch statement are supported. See page 231.
  • Constants. Readonly, named constants are supported. This feature is available only in the C implementation of JavaScript. See page 215.
  • Getters and Setters. JavaScript writers can now add getters and setters to their objects. This feature is available only in the C implementation of JavaScript. See Defining Getters and Setters in Chapter 7 of the Core JavaScript Guide for information about this feature.

Click to Read More

Teach Yourself JavaScript in a Week

By Arman Danesh
In this book we are going to take a look at JavaScript—the internal scripting language Netscape has developed and included in the Navigator browser.
JavaScript is an evolving tool, like so many tools associated with the Internet and the World Wide Web. Still, the future of JavaScript is sufficiently clear that many people have already developed sophisticated Web-based applications using the language.
We start by taking a broad look at Netscape Navigator 2.0, the current version of the popular Web browser, which some estimates say commands more than 80 percent of the Web browser market. Following this, we take an introductory look at JavaScript and its relationship with Java and its place in the Netscape suite of Web development tools.
Once this is done, we will be ready to look at the nuts and bolts of the JavaScript language and learn how to apply them to real-world scenarios on the Web. JavaScript can be used to add a wide range of interactivity and functionality to Web pages including the following:
  • Dynamic forms that include built-in error checking
  • Spread sheets and calculators
  • User interaction in the form of warning messages and confirmation messages
  • Dynamic changes to text and background colors
  • The ability to analyze URLs and access URLs in a user's history list
  • The capability to open, name, clear, and close new windows and direct output to specific frames

These types of functions already appear in numerous Web sites on the World Wide Web, and it is expected that the number will grow rapidly in early 1996 now that Navigator 2.0 has moved from being a beta product to commercial release software.

Throughout the book, you will have the opportunity to develop several small scripts that you can immediately use in your own Web pages.

Finally, we close with a review of the future of JavaScript and where it seems to be heading. We will consider Netscape's plans as well as announcements from other companies to include JavaScript in their products.

Click to Read More

JavaScript The Definitive Guide - Fourth Edition

by David Flanagan

This edition of JavaScript: The Definitive Guide has been thoroughly updated in light of the changes I just described. Major new features include complete coverage of JavaScript 1.5 and the third edition of the ECMA-262 standard on which it is based, and complete coverage of the Level 2 DOM standard.
Throughout the book, the focus has shifted from documenting particular JavaScript and browser implementations ( JavaScript 1.2, Netscape 4, Internet Explorer 5, etc.) to documenting the standards upon which those implementations are (or ought to be) based. Because of the proliferation of implementations, it is no longer practical for any one book to attempt to document -- or for any one developer to attempt to understand -- every feature, proprietary extension, quirk, and bug of every implementation. Focusing on the specifications instead of the implementations makes this book easier to use and, if you take the same approach, will make your JavaScript code more portable and maintainable. You'll particularly notice the increased emphasis on standards in the new material on core JavaScript and the DOM.
Another major change in this edition is that the reference section has been split into three distinct parts. First, the core JavaScript material has been separated from the client-side JavaScript material (Part IV) and placed in a section of its own (Part III). This division is for the convenience of JavaScript programmers who are working with the language in an environment other than a web browser and who are not interested in client-side JavaScript.
Second, the new material documenting the W3C DOM has been placed in a section of its own (Part V), separate from the existing client-side JavaScript material. The DOM standard defines an API that is quite distinct from the "legacy" API of traditional client-side JavaScript. Depending on the browser platforms they are targeting, developers typically use one API or the other and usually do not need to switch back and forth. Keeping these two APIs distinct also preserves the organization of the existing client-side reference material, which is convenient for readers of the third edition who upgrade to this edition.
In order to accommodate all the new material without making the book much, much larger, I've gotten rid of reference pages for the trivial properties of objects. These properties are already described once on the reference page for the object, and putting another description in a reference page of its own was redundant and wasteful. Properties that require substantial description, as well as all methods, still have reference pages of their own. Furthermore, the design wizards at O'Reilly have created a new interior design for the book that remains easy and pleasant to read but takes up less space.
Click to Read More

Followers