Books
in black and white
Main menu
Home About us Share a book
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Javascript for dummies. Quick Reference - Vander

Vander Javascript for dummies. Quick Reference - Wiley Publishing, 2002. - 115 p.
Download (direct link): javascriptquickreference2002.pdf
Previous << 1 .. 3 4 5 6 7 8 < 9 > 10 11 12 13 14 15 .. 72 >> Next

</TAG-NAME> Some tags require a closing tag, like this: <TITLE>Some title</TITLE>
Figuring Out What the Icons Mean
To make your life easier (as it relates to JavaScript, at least!), I include a few icons to give you a heads-up on practical scripting-related tidbits:
This icon indicates a handy cross-reference to some other. . .For Dummies book that explains the related topic in lots more detail.
This icon alerts you to handy tricks and techniques that can save you time, hassle, and many, many tufts of hair.
Next to this icon are common pitfalls, bugs, and assorted “uh-ohs” to look out for.
This icon points out items that don’t work the way you’d expect them to — a touch of illogic in the normally logical world of computerdom.
This icon .marks a faster way that you might choose to accomplish a task — saving you valuable time and keystrokes.
This icon flags Web sites that you can visit for more in-depth information on a related topic.
Rejoice when you see this icon! It indicates real-live, working JavaScript/HTML source code.
8 How to Use This Book
Where to Go from Here
Because JavaScript gives you instant feedback, it’s really fun to use (okay, it’s fun compared to other programming languages — maybe not compared to a two-week beach vacation!). To get the most out of this book, you may want to try creating a Web page from scratch and then adding to it a piece at a time as ideas occur to you. Take the afternoon off, kick the dogs out, and experiment with some of the suggestions in this book. If you get stuck, just flip to the section that covers whatever’s giving you a hard time, copy the example you’ll find there, and modify it until it’s just the way you want it. Creating incredible Web pages with JavaScript isn’t illegal, immoral, or fattening, so what are you waiting for? Go for it!
To get some troubleshooting tips if you get an error message on your JavaScript code, check out the JavaScript For Dummies Quick Reference page on the Dummies Web site at http : / / www.Dummi es.com
First Things First: Creating HTML Objects to Work Within JavaScript
JavaScript is an ultra-pared-down, ultra-easy programming language specifically designed to make Web page elements interactive. An interactive element is one that responds to user input — for example, a push button that causes something to happen when a user clicks on it, or a text field that automatically checks the accuracy of text that a user types in. In order to make elements interactive, though, the elements first have to exist. For elements to exist, you have to create them — which you can do easily with HTML statements like the ones in this part.
In this part...
is* Creating a basic, no-nonsense Web page in HTML
v* Adding elements to your Web page
v* Connecting your Web page to a server-side CGI program
10 Creating a Meat-and-Potatoes Web Page
Creating a Meat-and-Potatoes Web Page
Creating a Web page is a fairly simple process, as you can see in this overview. (The rest of this part shows you exactly how to implement each phase of the overview.)
First, you need to create an HTML document file called someFile.html (or, if your system doesn’t support long filename extensions, name your file s ome File, h tm). You can use whichever text editor you’re most comfortable with to create the HTML file, such as WordPad, BBEdit, the text editor that’s included as part of Netscape Navigator Gold, or even your favorite word processor package — as long as the program lets you save plain text. The HTML document that you create should have the following sections:
♦ The overall document section (required): In order for the HTML interpreter to recognize that your document is an HTML file and not just any old file, the document file’s first line must contain the beginning <HTML> tag, and the last line must contain the ending </HTM L> tag. All the other HTML tags and JavaScript statements you decide to incorporate into your Web page are optional — but whichever tags or statements you include must appear between the <HTML>. . .</HTML> tags.
♦ The header section (optional): If your document has a header (such as “Creating a Meat-and-Potatoes Web Page,” which you see at the beginning of this section), the header immediately follows the beginning <HTML> tag. The header is bounded by the opening <HEAD> tag and the closing </HEAD> tag. You must place some elements inside the header, such as your Web page’s title. Other elements — for example, a JavaScript script, which is identified by the <SС RI PT> tag — may or may not take up residence in the header.
♦ The body section (technically optional but practically required!): You could create a document that doesn’t contain a body, but it would be pretty boring! All the interactive form elements that you become familiar with in this part must appear between the <B0DY>. . .</B0DY> tags in order to be recognized by the HTML interpreter. >>
See also “Getting Started with a Bare-Bones HTML Template,” in Part IX, which contains a mini-HTML file with the document, header, body, and script tags already in place.
Previous << 1 .. 3 4 5 6 7 8 < 9 > 10 11 12 13 14 15 .. 72 >> Next