Style Conventions

Introduction
byGareth Downes-Powellet al.
Wrox Press 2003

We've used a number of styles in the book to help you understand what's going on.

We've used the important words style to flag up new or important subjects.

Screen Text is used to indicate anything you'd see on the screen, including

URLs. New blocks of code are in this code foreground style:

     <html>     <body>     <script language="JavaScript">       var myCalc = 1 + 2;       document.write("The calculated number is " + myCalc);     </script>     </body>     </html> 

If we're amending a script, perhaps adding in a new line or making changes to an existing one, then we use the code background style for the code that you've already seen together with the foreground style to highlight the new code:

     <html>     <body>     <script language="JavaScript">       var userEnteredNumber = prompt("Please enter a number","");       var myCalc = 1 + userEnteredNumber;       var myResponse = "The number you entered + 1 = " + myCalc;       document.write( myResponse);     </script>     </body>     </html> 

To talk about code within text we use this code in text style, which is also used for file names like MyFirstPHP.php

Important 

Essential not-to-be-missed information is in boxes like this.

Asides to the current discussion are presented like this.

A Note About Code Formatting

We've tried to make the code as easy to read as possible. This does mean that there is sometimes whitespace in the scripts that would break the code if you used it exactly as it is printed. For example, this JavaScript code:

             output+="<a href=\""+getPageName(pages[i][j])+".html\" class=\"page\"       title=\""+pages[i][j]+"\">"; 

will look like this in the book:

             output+="<a href=\""+getPageName(pages[i][j])+".html\" class=\"page\"                      title=\""+pages[i] [j]+"\">"; 

The code in the download is without the whitespace.



Dreamweaver MX PHP Web Development
Dreamweaver Mx: Advanced Php Web Development
ISBN: 1904151191
EAN: 2147483647
Year: 2001
Pages: 88

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net