Click FORWARD to continue
2 of 9

DHTML and JavaScript

Once you understand the basic concepts of dynamic positioning using JavaScript in the coming pages, the possibilities of making a web page dynamic is endless. With imagination, practice and proficiency in JavaScript, you can create highly interactive web pages. Some of the possibilities are:
  • Animation: images contained in a positioned block can be moved around the page following a certain path.
  • Drop-down menus: modifying clipping regions allows you to show or hide portions of a content block. To create a drop down menu, you would initially show only the top strip of the block containing the menu choices. When the user triggers the menu to drop, you change the clipping region to display the vertical length of the menu chosen. We'll look at triggers from user events later in this article.
  • Content-swapping: by positioning multiple blocks of content at the same spot on the page, yet keeping all but one block invisible, you can quickly swap a new block of content into place by changing their visibility properties. Alternatively, by keeping two overlapped blocks visible, you can modify their clipping regions in such a pattern as to produce a "transition" effect.