Chapter 12: Scripting Web Pages PDF Print E-mail
Sections - Part IV: Integrating Scripts with (X)HTML

When used in conjunction with your HTML markup, scripts -- small programs that you add to your Web page -- help your Web pages respond to user actions. Scripts create the interactive and dynamic effects you see on the Web, such as images that automatically change when visitors move mouse pointers over them, additional browser windows that pop up when a page loads, and animated navigation bars.

Because scripts are mini-programs, they're often written in a programming language called JavaScript. If you are unfamiliar with the term, JavaScript may sound like a Hollywood screenplay doused with coffee. However, it is actually a scripting language built right into all popular Web browsers.

Fortunately, because of the Nobel-Prize-worthy invention of "copy and paste," you don't need to be a technoguru to add scripting to your Web sites. The Web has many sites that feature canned JavaScript scripts that you can freely copy and then paste right into your Web page (Chapter 13 lists several of the best JavaScript sites).

In this chapter, you explore how scripting works inside your Web page by dissecting three sample scripts written in JavaScript. Chapter 13 continues this discussion by diving deeper into the JavaScript language itself.

Many good Web-page editors (such as Adobe Dreamweaver and GoLive) have built-in tools to help you create scripts -- even if you don't know anything about programming.

Page 216: Visit Backup Brain and look for the buttons below the "Change your font" entry at the upper right corner of the page (buttons labeled "Sm sans" and "Lg serif").

Page 216-217, Figure 12-2, Listing 12-1: Style switching (display view) (code view)

Page 218, Figure 12-3, Listing 12-2: Pop-up windows (display view) (code view)

Page 219-220: Listing 12-3, Figure 12-4: Validating form data (display view) (code view)

Page 222: You can get to Gmail by entering www.gmail.com or mail.google.com. Take your pick!

 

.ZIP file of all code samples from this chapter (5kb)

 

 



Share this page!
Reddit! Del.icio.us! JoomlaVote! Google! Live! Facebook! StumbleUpon! Yahoo! Free social bookmarking plugins and extensions for Joomla! websites!
Last Updated on Monday, 30 June 2008 11:40
 
Chapter Resources
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
Chapter 12
Chapter 13
Chapter 14
Chapter 15
Chapter 16
Chapter 17
Chapter 18
Chapter 19
Chapter 20
Chapter 21
Chapter 22
Chapter 23
Feedback - send us a message
Featured Links:
Banner
Visit co-author
Ed Tittel's web site!
Visit co-author
Jeff Noble's web site!
Conquest Media
Web page layout and
hosting provided by
SheTech and Company. the power of the web. http://www.shetech.com