1 / 16

Advanced Web Design

Advanced Web Design. Scripting Tutorial Chapters. Scripting Intro.

Download Presentation

Advanced Web Design

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advanced Web Design Scripting Tutorial Chapters

  2. Scripting Intro • The scripting part of the forthcoming Advanced Web Design textbook introduces you to the concept of scripting and steps you through a programming primer in which you learn how to create different kinds of scripts. To get started, you should go to Chapter 9 and work through it at your own pace.

  3. What Is Scripting? • Scripting is the act of writing little computer programs that can enhance the appearance and functionality of a web page. • Browsers render web pages by placing objects onscreen. • Scripts let you grab hold of those objects to make them do special things.

  4. What Can Scripts Do? • You can grab hold of the browser’s status bar, for example, and write a message into it. • You can make text on your web pages display active content, such as the current date and time. • You can create rollover effects that highlight a graphic, make sounds, and pop out explanatory messages when the user moves the mouse over an object onscreen.

  5. Scripts Can Process Forms • When the user clicks a button to submit something typed into a text field, you can grab hold of the text field and validate what the user entered into it. • You can also write scripts that use cookies to remember things as the user navigates from screen to screen.

  6. Scripting Languages • There are many different brands of scripting languages. • This course teaches you how to use the four leading brands, which are JavaScript, VBScript, JScript, and a new language called C#. • The book divides into columns devoted to the different scripting languages.

  7. Where Do Scripts Go? • You can put scripts in the head or in the body section of a web page. • Scripts can also reside in separate files that get included in the page at runtime. • The .NET framework, for example, enables you to create code-behind files that keep your scripts separate from your HTML.

  8. Where Do Scripts Run? • Scripts run either on the client (i.e., in the browser) or on the server that hosts the web site. • JavaScript is an example of a scripting language that runs on the client. When a browser encounters JavaScript on a web page, the browser processes the script and renders the result onscreen. • ASP scripts, on the other hand, run on the server. When a browser asks a server to display an ASP page, the server executes any JScript or VBScript on the page before sending the response to the browser.

  9. Hello, World! • Let’s work through the Hello, World example together. • JavaScript • JScript • VBScript

  10. Scripting Variables • Chapter 10 introduces the concept of a variable and teaches you how to assign values to string variables and numeric variables. After learning how to stylize and concatenate variables into print strings, you create a clock script that displays the current date and time onscreen.

  11. Scripting Logic • Learning how to program arrays, loops, and comparisons brings a new dimension to your scripting prowess. That new dimension is logic. In chapter 11 you learn how to give your scripts the ability to acquire knowledge and make decisions.

  12. Scripting Functions • Learning how to write functions can help you organize your code better and save time writing scripts. Chapter 12 teaches you how to write functions and use include files to make your functions easy to maintain.

  13. Scripting Forms and Cookies • Chapter 13 teaches you how to write scripts that process forms. You will learn how to write an ASP script to receive and process data posted by a form. Then you learn to use cookies to maintain state as the user moves from page to page. As a final touch, you learn how to read the values of the cookies and make decisions based on what the user has done at your web site.

  14. Document Object Model • Chapter 14 introduces the Document Object Model (DOM). • The DOM is the official W3C structural definition of the objects, methods, and properties that comprise documents on the World Wide Web.

  15. DHMTL Effects • By manipulating objects in the DOM, you can create dynamic HTML (DHTML) effects, including rollovers. • Chapter 14 teaches you how to create rollovers and other kinds of DHTML effects using Microsoft FrontPage.

  16. Another Approach • For students who would like to try a new approach to teaching scripting, I have printed a few copies of the Introduction to Scripting from ITAW. • I would value your feedback, especially if you find any glitches in this newly written tutorial.

More Related