Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Design > Voices That Matter

This chapter is from the book


There is no need to make the user wait for an entire new page to load when all you want to change is just a single layer's contents. Don't let the name fool you; the Set Text of Layer behavior does more than change text in a layer. You need at least one layer on the page before you can click the Behaviors panel's Add (+) button and select Set Text > Set Text of Layer. In the dialog that appears, notice that it says New HTML. Try using any HTML you want, and as long as the browser understands it, that code will be represented in the layer after you click OK. Be sure that the event listed in the Behaviors panel is set the way you want it, and then go ahead and preview the page.

"Why not use Show/Hide Layers and use as many layers as needed?" One benefit is that the layer will always have the same ID and other attributes. This means that the look of the layer can remain consistent without repeating the same code.

Figure 5.10Figure 5.10

  • + Share This
  • 🔖 Save To Your Account