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

Chapter 9. Server Behaviors >  Workshop #2: Inserting Dynamically Determined Im...

Workshop #2: Inserting Dynamically Determined Images

This behavior comes from one of my favorite database tricks: using an ID field from a database record to construct names and pathnames of images to insert in documents. An online catalog, for instance, might give each inventory item a unique ID such as CW-11. The manufacturer of that item might have the unique ID CW. Given those IDs, if I save a picture of the product as CW-11.jpg, and store it in a folder with all my other images, I can construct image paths for my documents without having to add an extra database field to store the image name or path. Although it’s certainly possible to use the dynamic attributes available in Dreamweaver to accomplish this same thing, there’s a lot less typing and thinking involved if it can be packaged up into a nice neat server behavior.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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