• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 10. Filtering and Displaying Data > Adding Dynamic Images and Formatting...

Adding Dynamic Images and Formatting the Population Number

The country profile is basically functional, so at this point, you'll add a couple enhancements to make it look better. In this task, you'll add an image dynamically, and you'll also format the population number to make it more readable. Formatting the population number is akin to formatting a number as currency, which you did in an earlier lesson. (You'll fix the region name problem later in the lesson.)

You might wonder how it is even possible to insert an image dynamically, since you can't put a whole image inside an Access database. You can, however, put an image's URL in a database, which is exactly what I did. Each tour and each country has an image, all of which are located in the images folder. An extra field in the database holds the image's URLs, and I entered the URLs when adding new records. To display an image, all you need to do is dynamically load its URL into an otherwise static <img> element in HTML.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint