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

Chapter 5. ImageMachine > Potential Extension: Adding Attributes to the Templat...

5.3. Potential Extension: Adding Attributes to the Template

Big applications can always be made bigger. This section is devoted to showing you how to add attributes to the image template, giving you greater control over the generated code. For the sake of simplicity, I'll show you how to add the IMG attributes HSPACE and VSPACE. The procedure involves these six steps:

  1. Add the new fields in the default template.

  2. Create an array for its values in setArrays().

  3. Capture the new default values.

  4. Add text fields in the image template in generateEntryForm().

  5. Reference and assign the new attribute values in genJavaScript().

  6. Generate the HTML required to display the attributes in genJavaScript().


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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