Linking to a Static Image

Linking to a static image was described when creating the e-mail address widget in the previous chapter, but is worth repeating here. Static images are stored in the folder Images which is located directly under the application's context root. Because a UIM page is in a locale specific folder, when icons or other resources are referenced the ../ path prefix is needed for relative URIs. This is to move from the locale-specific folder in the page's URI, back to the context root folder as shown in this excerpt from the sample code:

Figure 1. Linking to a Static Image
anchorImg.setAttribute("src", "../Images/arrow-icon.png");