Home
Developers

Developers

  • Documentation
    • Developer Guide
    • API Reference
    • Style Guide
    • How-To
    • Troubleshooting
  • Submit a Flake
  • Support

Pageflakes How-To and Troubleshooting Guide

  • Manage Flake Instances
  • Server-Side Scripting
  • Auto-Save Settings
  • Storing an Array into a Profile
  • Using CSS
  • Access Web Services from Flakes
  • Flake Development Tools
  • Troubleshooting
    • Using the "id" element correctly
    • Using XMLHttpRequest
    • Issues with Internet Explorer, Firefox and Opera
    • Use CDATA inside script blocks
    • Avoid memory leaks and understand 'this'
    • Minimize processing in load()
    • Do not use alert()
    • Do not use <form> elements
Home » Documentation » How-To » Troubleshooting

Using the "id" element correctly

Markup elements fall into two categories: instance-specific elements and Page-Set specific elements. (This is somewhat analogous to class versus instance members, for those familiar with object orientation).

If a given flake exists many times in a Page-Set, an instance-specific element is created multiple times. The id attribute of such elements needs to be pre-pended with _PAGEFLAKES_, such that each element has a unique id attribute.

Page-Set specific elements are created once, regardless of how many times a flake exists on a Page-Set. The id attribute of such elements must be unique, such that it does not conflict with other Page-Set specific elements. For example, <script> elements containing FUA code, or <link> elements referencing style-sheets are Page-Set specific.

‹ TroubleshootingupUsing XMLHttpRequest ›
»
  • Printer-friendly version
  • Add new comment