Chapter 16. Basic Dynamic Techniques


Almost all of DHTML is based on a few basic tricks that allow you to hide or show elements, move them around, and make other changes. For the most part, these techniques are based on the ability to change the CSS properties of an element with JavaScript using the getElementbyId() method to find it. However, you can also change the actual content between the tags of an object.

In this chapter, we'll look at simple examples of how to create functions that change the following:

  • An element's visibility or display state to show and hide it

  • An element's position either to a specific location or by a certain amount.

  • An element's clipping region to show and hide parts of an element

  • An element's content after the page is loaded

We'll also look at how to change an element's properties across different frames or windows.

These techniques are the building blocks from which you can create a wide variety of dynamic effects. Let's start with the most basic: changing any object's CSS properties.




CSS, DHTML and Ajax. Visual QuickStart Guide
CSS, DHTML, and Ajax, Fourth Edition
ISBN: 032144325X
EAN: 2147483647
Year: 2006
Pages: 230

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