Purchase Solution

A simple example of dynamic HTML

Not what you're looking for?

Ask Custom Question

Chapter Title - Dynamic XHTML Documents with JavaScript

Exercise 1

Create a document (with any required style sheets and java .js files) that displays a sports related image of your choice and three buttons. The buttons should be labeled simply 1,2, and 3. When pressed, each button should change the content of the image to that of a different image.

Exercise 2

Create a document that contains four short paragraphs of text, stacked on top of each other, with only enough of each showing so that the mouse cursor can always be placed over some part of them. When the cursor is placed over the exposed part of any paragraph, it should rise to the top to become completely visible. When a paragraph is moved from the top stacking position, it must return to its original position rather than the bottom.

Purchase this Solution

Solution Summary

This solution provides a simple but common example of using javascript to create dynamic HTML. The solution provides two applications. The first one swaps images when a button is pressed. The second one shows how to have layered paragraphs where only one is visible at a time.

Solution Preview

Both of these problems require using javascript to respond to a users
actions. In the image swapping problem the user clicks on a button to
cause the image src file to change. In the "top paragraph" problem
the user's mouse movements trigger the javascript to change the order
of ...

Purchase this Solution

Free BrainMass Quizzes
Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

C# variables and classes

This quiz contains questions about C# classes and variables.

Basic Networking Questions

This quiz consists of some basic networking questions.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.