Home | DHTML

Exercise 3: DHTML

Modify the example document ex3.html

Using JavaScript and DHTML, add another news item to your document.

The steps to follow:

  1. Add another news blurb to the table on the right, and name it uniquely. DIV is a handy wrapper element for labelling your news blurb with a unique ID.

  2. Add a style sheet rule to control the visibility of your new DIV.

  3. Add a style sheet rule to control the appearance of your new DIV. You'll want to the same appearance for your headline, so a rule with a class selector is a good choice.

  4. Check the scripts newsdisplay() and newshide() to see what they do.

  5. Add a news headline in the left data cell for your news blurb. Put an anchor around it, and add the appropriate event handlers to call the functions that make the news blurb appear and disappear.

Hint: you'll need to edit the javascript calls for the old news blurbs to make them behave appropriately now that you've added another blurb.

Home | DHTML